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

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

Issue 23903056: Add a container window to host the desktop window hierarchy in AURA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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
===================================================================
--- ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (revision 224198)
+++ ui/views/widget/desktop_aura/desktop_native_widget_aura.cc (working copy)
@@ -177,6 +177,7 @@
can_activate_(true),
desktop_root_window_host_(NULL),
window_(new aura::Window(this)),
+ content_window_container_(NULL),
native_widget_delegate_(delegate),
last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
restore_focus_on_activate_(false),
@@ -295,6 +296,14 @@
this, params.bounds);
root_window_.reset(
desktop_root_window_host_->Init(window_, params));
+
+ content_window_container_ = new aura::Window(NULL);
+ content_window_container_->Init(ui::LAYER_NOT_DRAWN);
+ content_window_container_->Show();
+ content_window_container_->AddChild(window_);
+ content_window_container_->SetBounds(root_window_->bounds());
+ root_window_->AddChild(content_window_container_);
+
root_window_->AddRootWindowObserver(this);
stacking_client_.reset(
@@ -495,6 +504,8 @@
gfx::ToCeiledPoint(gfx::ScalePoint(bounds.origin(), scale)),
gfx::ToFlooredSize(gfx::ScaleSize(bounds.size(), scale)));
desktop_root_window_host_->AsRootWindowHost()->SetBounds(bounds_in_pixels);
+ content_window_container_->SetBounds(
+ content_window_container_->GetRootWindow()->bounds());
}
void DesktopNativeWidgetAura::SetSize(const gfx::Size& size) {

Powered by Google App Engine
This is Rietveld 408576698