| Index: trunk/src/ui/views/widget/native_widget_aura.cc
|
| ===================================================================
|
| --- trunk/src/ui/views/widget/native_widget_aura.cc (revision 271508)
|
| +++ trunk/src/ui/views/widget/native_widget_aura.cc (working copy)
|
| @@ -76,7 +76,6 @@
|
| window_(new aura::Window(this)),
|
| ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
|
| close_widget_factory_(this),
|
| - can_activate_(true),
|
| destroying_(false),
|
| cursor_(gfx::kNullCursor),
|
| saved_window_state_(ui::SHOW_STATE_DEFAULT) {
|
| @@ -161,9 +160,6 @@
|
| else
|
| SetBounds(window_bounds);
|
| window_->set_ignore_events(!params.accept_events);
|
| - can_activate_ = params.can_activate &&
|
| - params.type != Widget::InitParams::TYPE_CONTROL &&
|
| - params.type != Widget::InitParams::TYPE_TOOLTIP;
|
| DCHECK(GetWidget()->GetRootView());
|
| if (params.type != Widget::InitParams::TYPE_TOOLTIP)
|
| tooltip_manager_.reset(new views::TooltipManagerAura(GetWidget()));
|
| @@ -487,7 +483,7 @@
|
| if (state == ui::SHOW_STATE_MAXIMIZED || state == ui::SHOW_STATE_FULLSCREEN)
|
| window_->SetProperty(aura::client::kShowStateKey, state);
|
| window_->Show();
|
| - if (can_activate_) {
|
| + if (delegate_->CanActivate()) {
|
| if (state != ui::SHOW_STATE_INACTIVE)
|
| Activate();
|
| // SetInitialFocus() should be always be called, even for
|
| @@ -773,7 +769,7 @@
|
| }
|
|
|
| bool NativeWidgetAura::CanFocus() {
|
| - return can_activate_;
|
| + return ShouldActivate();
|
| }
|
|
|
| void NativeWidgetAura::OnCaptureLost() {
|
| @@ -870,7 +866,7 @@
|
| // NativeWidgetAura, aura::client::ActivationDelegate implementation:
|
|
|
| bool NativeWidgetAura::ShouldActivate() const {
|
| - return can_activate_ && delegate_->CanActivate();
|
| + return delegate_->CanActivate();
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|