Only define enable/disable API for views

This commit is contained in:
Cheng Zhao 2016-06-20 15:44:50 +09:00
parent e33e4be257
commit 5674e8d114
8 changed files with 64 additions and 98 deletions

View file

@ -57,7 +57,6 @@ NativeWindow::NativeWindow(
sheet_offset_x_(0.0),
sheet_offset_y_(0.0),
aspect_ratio_(0.0),
disable_count_(0),
parent_(parent),
is_modal_(false),
inspectable_web_contents_(inspectable_web_contents),
@ -185,18 +184,6 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
Show();
}
void NativeWindow::Disable() {
++disable_count_;
if (disable_count_ == 1)
SetEnabled(false);
}
void NativeWindow::Enable() {
--disable_count_;
if (disable_count_ == 0)
SetEnabled(true);
}
void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
SetBounds(gfx::Rect(GetPosition(), size), animate);
}