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

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

Issue 297503003: Revert: [Refactor] Consolidate the logic for whether a widget can be activated. This is a first ste (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 c5c977af61e355d5e990a3f0e3d8dbc2445ecf3d..198c5fbd185089fe487695ae9337d08b92efcfe0 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -95,9 +95,7 @@ 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.activatable = full_screen ?
- Widget::InitParams::ACTIVATABLE_YES :
- Widget::InitParams::ACTIVATABLE_NO;
+ init_params.can_activate = full_screen;
init_params.keep_on_top = root_is_always_on_top;
// This widget instance will get deleted when the window is
@@ -253,6 +251,7 @@ 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),
@@ -1052,7 +1051,7 @@ void DesktopNativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) {
// DesktopNativeWidgetAura, aura::client::ActivationDelegate implementation:
bool DesktopNativeWidgetAura::ShouldActivate() const {
- return native_widget_delegate_->CanActivate();
+ return can_activate_ && 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