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

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

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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
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 75eceb54bc15c8c3a3e6e3879db5c1b7eef32e5b..7f07b51c1815353f300f09272aa3cf883cf65384 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -24,6 +24,7 @@
#include "ui/views/corewm/shadow_controller.h"
#include "ui/views/corewm/shadow_types.h"
#include "ui/views/corewm/tooltip_controller.h"
+#include "ui/views/corewm/visibility_controller.h"
#include "ui/views/drag_utils.h"
#include "ui/views/ime/input_method.h"
#include "ui/views/ime/input_method_bridge.h"
@@ -219,7 +220,9 @@ void DesktopNativeWidgetAura::InitNativeWidget(
window_->SetTransparent(true);
window_->Init(params.layer_type);
corewm::SetShadowType(window_, corewm::SHADOW_TYPE_NONE);
+#if defined(OS_LINUX) // TODO(scottmg): http://crbug.com/180071
window_->Show();
+#endif
desktop_root_window_host_ = params.desktop_root_window_host ?
params.desktop_root_window_host :
@@ -240,6 +243,16 @@ void DesktopNativeWidgetAura::InitNativeWidget(
tooltip_controller_.get());
root_window_->AddPreTargetHandler(tooltip_controller_.get());
+ if (params.type != Widget::InitParams::TYPE_WINDOW) {
+ visibility_controller_.reset(new views::corewm::VisibilityController);
+ aura::client::SetVisibilityClient(GetNativeView()->GetRootWindow(),
+ visibility_controller_.get());
+ views::corewm::SetChildWindowVisibilityChangesAnimated(
+ GetNativeView()->GetRootWindow());
+ }
+ window_->Show();
+ desktop_root_window_host_->InitFocus(window_);
+
aura::client::SetActivationDelegate(window_, this);
shadow_controller_.reset(
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698