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

Side by Side Diff: ash/wm/window_mirror_view.cc

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 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
« no previous file with comments | « ash/wm/window_mirror_view.h ('k') | ash/wm/window_state_aura.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/wm/window_mirror_view.h" 5 #include "ash/wm/window_mirror_view.h"
6 6
7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/common/wm_window.h"
9 #include "ash/common/wm_window_property.h" 9 #include "ash/common/wm_window_property.h"
10 #include "ash/wm/window_state_aura.h" 10 #include "ash/wm/window_state_aura.h"
11 #include "ui/aura/client/aura_constants.h" 11 #include "ui/aura/client/aura_constants.h"
12 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
13 #include "ui/compositor/layer.h" 13 #include "ui/compositor/layer.h"
14 #include "ui/compositor/layer_tree_owner.h" 14 #include "ui/compositor/layer_tree_owner.h"
15 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
16 #include "ui/wm/core/window_util.h" 16 #include "ui/wm/core/window_util.h"
17 17
18 namespace ash { 18 namespace ash {
19 namespace wm { 19 namespace wm {
20 namespace { 20 namespace {
21 21
22 void EnsureAllChildrenAreVisible(ui::Layer* layer) { 22 void EnsureAllChildrenAreVisible(ui::Layer* layer) {
23 std::list<ui::Layer*> layers; 23 std::list<ui::Layer*> layers;
24 layers.push_back(layer); 24 layers.push_back(layer);
25 while (!layers.empty()) { 25 while (!layers.empty()) {
26 for (auto* child : layers.front()->children()) 26 for (auto* child : layers.front()->children())
27 layers.push_back(child); 27 layers.push_back(child);
28 layers.front()->SetVisible(true); 28 layers.front()->SetVisible(true);
29 layers.pop_front(); 29 layers.pop_front();
30 } 30 }
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 WindowMirrorView::WindowMirrorView(WmWindowAura* window) : target_(window) { 35 WindowMirrorView::WindowMirrorView(WmWindow* window) : target_(window) {
36 DCHECK(window); 36 DCHECK(window);
37 } 37 }
38 38
39 WindowMirrorView::~WindowMirrorView() { 39 WindowMirrorView::~WindowMirrorView() {
40 if (layer_owner_) 40 if (layer_owner_)
41 target_->aura_window()->ClearProperty(aura::client::kMirroringEnabledKey); 41 target_->aura_window()->ClearProperty(aura::client::kMirroringEnabledKey);
42 } 42 }
43 43
44 gfx::Size WindowMirrorView::GetPreferredSize() const { 44 gfx::Size WindowMirrorView::GetPreferredSize() const {
45 return GetClientAreaBounds().size(); 45 return GetClientAreaBounds().size();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 // The target window may not have a widget in unit tests. 112 // The target window may not have a widget in unit tests.
113 if (!target_->GetInternalWidget()) 113 if (!target_->GetInternalWidget())
114 return gfx::Rect(); 114 return gfx::Rect();
115 views::View* client_view = target_->GetInternalWidget()->client_view(); 115 views::View* client_view = target_->GetInternalWidget()->client_view();
116 return client_view->ConvertRectToWidget(client_view->GetLocalBounds()); 116 return client_view->ConvertRectToWidget(client_view->GetLocalBounds());
117 } 117 }
118 118
119 } // namespace wm 119 } // namespace wm
120 } // namespace ash 120 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_mirror_view.h ('k') | ash/wm/window_state_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698