Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1647)

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 286733002: [Refactor] Consolidate the logic for whether a widget can be activated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index d7347d008257c90ea2aa568c9c466cebf935ec6e..3a3a9dd6a20257b75c7f6dcfc4e4f6e15e8f0d83 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -94,7 +94,9 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver {
init_params.bounds = bounds;
init_params.ownership = Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET;
init_params.layer_type = aura::WINDOW_LAYER_NOT_DRAWN;
- init_params.can_activate = full_screen;
+ init_params.activatable = full_screen ?
+ Widget::InitParams::ACTIVATABLE_YES :
+ Widget::InitParams::ACTIVATABLE_NO;
init_params.keep_on_top = root_is_always_on_top;
// This widget instance will get deleted when the window is
@@ -250,7 +252,6 @@ DesktopNativeWidgetAura::DesktopNativeWidgetAura(
: desktop_window_tree_host_(NULL),
ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
close_widget_factory_(this),
- can_activate_(true),
content_window_container_(NULL),
content_window_(new aura::Window(this)),
native_widget_delegate_(delegate),
@@ -1049,7 +1050,7 @@ void DesktopNativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) {
// DesktopNativeWidgetAura, aura::client::ActivationDelegate implementation:
bool DesktopNativeWidgetAura::ShouldActivate() const {
- return can_activate_ && native_widget_delegate_->CanActivate();
+ return native_widget_delegate_->CanActivate();
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698