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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "ui/aura/env.h" 7 #include "ui/aura/env.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/aura/root_window_transformer.h" 9 #include "ui/aura/root_window_transformer.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 RootWindowHost::~RootWindowHost() { 75 RootWindowHost::~RootWindowHost() {
76 // TODO(beng): this represents an ordering change. In the old code, the 76 // TODO(beng): this represents an ordering change. In the old code, the
77 // compositor was reset before the window hierarchy was destroyed. 77 // compositor was reset before the window hierarchy was destroyed.
78 // verify that this has no adverse effects. 78 // verify that this has no adverse effects.
79 // Make sure to destroy the compositor before terminating so that state is 79 // Make sure to destroy the compositor before terminating so that state is
80 // cleared and we don't hit asserts. 80 // cleared and we don't hit asserts.
81 compositor_.reset(); 81 compositor_.reset();
82 } 82 }
83 83
84 void RootWindowHost::InitHost() { 84 void RootWindowHost::InitHost() {
85 window()->Init(ui::LAYER_NOT_DRAWN); 85 window()->Init(aura::WINDOW_LAYER_NOT_DRAWN);
86 InitCompositor(); 86 InitCompositor();
87 UpdateRootWindowSize(GetBounds().size()); 87 UpdateRootWindowSize(GetBounds().size());
88 Env::GetInstance()->NotifyRootWindowInitialized(delegate_->AsRootWindow()); 88 Env::GetInstance()->NotifyRootWindowInitialized(delegate_->AsRootWindow());
89 window()->Show(); 89 window()->Show();
90 } 90 }
91 91
92 void RootWindowHost::InitCompositor() { 92 void RootWindowHost::InitCompositor() {
93 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), 93 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
94 GetBounds().size()); 94 GetBounds().size());
95 compositor_->SetRootLayer(window()->layer()); 95 compositor_->SetRootLayer(window()->layer());
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), 184 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
185 new_size); 185 new_size);
186 186
187 // The layer, and the observers should be notified of the 187 // The layer, and the observers should be notified of the
188 // transformed size of the root window. 188 // transformed size of the root window.
189 UpdateRootWindowSize(new_size); 189 UpdateRootWindowSize(new_size);
190 delegate_->OnHostResized(new_size); 190 delegate_->OnHostResized(new_size);
191 } 191 }
192 192
193 } // namespace aura 193 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698