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

Side by Side Diff: ash/wm/aura/wm_window_aura.cc

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/aura/wm_window_aura.h ('k') | ash/wm/common/default_state.h » ('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/aura/wm_window_aura.h" 5 #include "ash/wm/aura/wm_window_aura.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shelf/shelf_util.h" 8 #include "ash/shelf/shelf_util.h"
9 #include "ash/wm/aura/aura_layout_manager_adapter.h" 9 #include "ash/wm/aura/aura_layout_manager_adapter.h"
10 #include "ash/wm/aura/wm_globals_aura.h" 10 #include "ash/wm/aura/wm_globals_aura.h"
11 #include "ash/wm/aura/wm_root_window_controller_aura.h" 11 #include "ash/wm/aura/wm_root_window_controller_aura.h"
12 #include "ash/wm/common/window_state.h" 12 #include "ash/wm/common/window_state.h"
13 #include "ash/wm/common/wm_layout_manager.h" 13 #include "ash/wm/common/wm_layout_manager.h"
14 #include "ash/wm/common/wm_window_observer.h" 14 #include "ash/wm/common/wm_window_observer.h"
15 #include "ash/wm/common/wm_window_property.h" 15 #include "ash/wm/common/wm_window_property.h"
16 #include "ash/wm/window_animations.h" 16 #include "ash/wm/window_animations.h"
17 #include "ash/wm/window_properties.h" 17 #include "ash/wm/window_properties.h"
18 #include "ash/wm/window_state_aura.h" 18 #include "ash/wm/window_state_aura.h"
19 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
20 #include "ui/aura/client/aura_constants.h" 20 #include "ui/aura/client/aura_constants.h"
21 #include "ui/aura/client/window_tree_client.h" 21 #include "ui/aura/client/window_tree_client.h"
22 #include "ui/aura/layout_manager.h" 22 #include "ui/aura/layout_manager.h"
23 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
24 #include "ui/aura/window_delegate.h" 24 #include "ui/aura/window_delegate.h"
25 #include "ui/aura/window_property.h" 25 #include "ui/aura/window_property.h"
26 #include "ui/base/hit_test.h" 26 #include "ui/base/hit_test.h"
27 #include "ui/compositor/layer_tree_owner.h" 27 #include "ui/compositor/layer_tree_owner.h"
28 #include "ui/compositor/scoped_layer_animation_settings.h" 28 #include "ui/compositor/scoped_layer_animation_settings.h"
29 #include "ui/gfx/screen.h" 29 #include "ui/display/screen.h"
30 #include "ui/wm/core/coordinate_conversion.h" 30 #include "ui/wm/core/coordinate_conversion.h"
31 #include "ui/wm/core/window_util.h" 31 #include "ui/wm/core/window_util.h"
32 32
33 DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmWindowAura*); 33 DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmWindowAura*);
34 34
35 namespace ash { 35 namespace ash {
36 namespace wm { 36 namespace wm {
37 37
38 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::wm::WmWindowAura, kWmWindowKey, nullptr); 38 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::wm::WmWindowAura, kWmWindowKey, nullptr);
39 39
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 ui::wm::WindowType WmWindowAura::GetType() const { 131 ui::wm::WindowType WmWindowAura::GetType() const {
132 return window_->type(); 132 return window_->type();
133 } 133 }
134 134
135 ui::Layer* WmWindowAura::GetLayer() { 135 ui::Layer* WmWindowAura::GetLayer() {
136 return window_->layer(); 136 return window_->layer();
137 } 137 }
138 138
139 gfx::Display WmWindowAura::GetDisplayNearestWindow() { 139 display::Display WmWindowAura::GetDisplayNearestWindow() {
140 return gfx::Screen::GetScreen()->GetDisplayNearestWindow(window_); 140 return display::Screen::GetScreen()->GetDisplayNearestWindow(window_);
141 } 141 }
142 142
143 bool WmWindowAura::HasNonClientArea() { 143 bool WmWindowAura::HasNonClientArea() {
144 return window_->delegate() ? true : false; 144 return window_->delegate() ? true : false;
145 } 145 }
146 146
147 int WmWindowAura::GetNonClientComponent(const gfx::Point& location) { 147 int WmWindowAura::GetNonClientComponent(const gfx::Point& location) {
148 return window_->delegate() 148 return window_->delegate()
149 ? window_->delegate()->GetNonClientComponent(location) 149 ? window_->delegate()->GetNonClientComponent(location)
150 : HTNOWHERE; 150 : HTNOWHERE;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 bool old_on_top = (old_bounds.width() > bounds.width()); 327 bool old_on_top = (old_bounds.width() > bounds.width());
328 if (old_on_top) 328 if (old_on_top)
329 old_layer->parent()->StackBelow(new_layer, old_layer); 329 old_layer->parent()->StackBelow(new_layer, old_layer);
330 else 330 else
331 old_layer->parent()->StackAbove(new_layer, old_layer); 331 old_layer->parent()->StackAbove(new_layer, old_layer);
332 332
333 CrossFadeAnimation(window_, std::move(old_layer_owner), gfx::Tween::EASE_OUT); 333 CrossFadeAnimation(window_, std::move(old_layer_owner), gfx::Tween::EASE_OUT);
334 } 334 }
335 335
336 void WmWindowAura::SetBoundsInScreen(const gfx::Rect& bounds_in_screen, 336 void WmWindowAura::SetBoundsInScreen(const gfx::Rect& bounds_in_screen,
337 const gfx::Display& dst_display) { 337 const display::Display& dst_display) {
338 window_->SetBoundsInScreen(bounds_in_screen, dst_display); 338 window_->SetBoundsInScreen(bounds_in_screen, dst_display);
339 } 339 }
340 340
341 gfx::Rect WmWindowAura::GetBoundsInScreen() const { 341 gfx::Rect WmWindowAura::GetBoundsInScreen() const {
342 return window_->GetBoundsInScreen(); 342 return window_->GetBoundsInScreen();
343 } 343 }
344 344
345 const gfx::Rect& WmWindowAura::GetBounds() const { 345 const gfx::Rect& WmWindowAura::GetBounds() const {
346 return window_->bounds(); 346 return window_->bounds();
347 } 347 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 561 }
562 562
563 void WmWindowAura::OnWindowVisibilityChanging(aura::Window* window, 563 void WmWindowAura::OnWindowVisibilityChanging(aura::Window* window,
564 bool visible) { 564 bool visible) {
565 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 565 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
566 OnWindowVisibilityChanging(this, visible)); 566 OnWindowVisibilityChanging(this, visible));
567 } 567 }
568 568
569 } // namespace wm 569 } // namespace wm
570 } // namespace ash 570 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/aura/wm_window_aura.h ('k') | ash/wm/common/default_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698