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

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: move to drwhw 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..6869717ab0685965ce1d4852c268f7150c383362 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,6 @@ void DesktopNativeWidgetAura::InitNativeWidget(
window_->SetTransparent(true);
window_->Init(params.layer_type);
corewm::SetShadowType(window_, corewm::SHADOW_TYPE_NONE);
- window_->Show();
desktop_root_window_host_ = params.desktop_root_window_host ?
params.desktop_root_window_host :
@@ -240,6 +240,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(

Powered by Google App Engine
This is Rietveld 408576698