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

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

Issue 2669303005: desktop-views: Create one fewer aura::Window for each widget. (Closed)
Patch Set: . Created 3 years, 10 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') | no next file » | 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 544da363f138105136afeeac5bfe589614cc8649..24cca0c9a39dbf2657a28b6fb14a22ad8d225561 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -239,7 +239,6 @@ DesktopNativeWidgetAura::DesktopNativeWidgetAura(
internal::NativeWidgetDelegate* delegate)
: desktop_window_tree_host_(NULL),
ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
- content_window_container_(NULL),
content_window_(new aura::Window(this)),
native_widget_delegate_(delegate),
last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
@@ -417,11 +416,6 @@ void DesktopNativeWidgetAura::InitNativeWidget(
content_window_->Init(params.layer_type);
wm::SetShadowElevation(content_window_, wm::ShadowElevation::NONE);
- content_window_container_ = new aura::Window(NULL);
- content_window_container_->Init(ui::LAYER_NOT_DRAWN);
- content_window_container_->Show();
- content_window_container_->AddChild(content_window_);
-
if (!desktop_window_tree_host_) {
desktop_window_tree_host_ =
params.desktop_window_tree_host
@@ -431,7 +425,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
}
desktop_window_tree_host_->Init(content_window_, params);
- host_->window()->AddChild(content_window_container_);
+ host_->window()->AddChild(content_window_);
host_->window()->SetProperty(kDesktopNativeWidgetAuraKey, this);
host_->window()->AddObserver(new RootWindowDestructionObserver(this));
@@ -518,8 +512,6 @@ void DesktopNativeWidgetAura::InitNativeWidget(
aura::client::SetVisibilityClient(host_->window(),
visibility_controller_.get());
wm::SetChildWindowVisibilityChangesAnimated(host_->window());
- wm::SetChildWindowVisibilityChangesAnimated(
- content_window_container_);
}
if (params.type == Widget::InitParams::TYPE_WINDOW) {
@@ -1167,9 +1159,6 @@ void DesktopNativeWidgetAura::OnHostResized(const aura::WindowTreeHost* host) {
gfx::Rect new_bounds = gfx::Rect(host->window()->bounds().size());
content_window_->SetBounds(new_bounds);
- // Can be NULL at start.
- if (content_window_container_)
- content_window_container_->SetBounds(new_bounds);
native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
}
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698