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

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

Issue 2001623003: Splits ToplevelWindowEventHandler into two (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gyp 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/BUILD.gn » ('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/shell.h"
9 #include "ash/wm/aura/aura_layout_manager_adapter.h" 10 #include "ash/wm/aura/aura_layout_manager_adapter.h"
10 #include "ash/wm/aura/wm_globals_aura.h" 11 #include "ash/wm/aura/wm_globals_aura.h"
11 #include "ash/wm/aura/wm_root_window_controller_aura.h" 12 #include "ash/wm/aura/wm_root_window_controller_aura.h"
12 #include "ash/wm/common/window_state.h" 13 #include "ash/wm/common/window_state.h"
13 #include "ash/wm/common/wm_layout_manager.h" 14 #include "ash/wm/common/wm_layout_manager.h"
14 #include "ash/wm/common/wm_window_observer.h" 15 #include "ash/wm/common/wm_window_observer.h"
15 #include "ash/wm/common/wm_window_property.h" 16 #include "ash/wm/common/wm_window_property.h"
17 #include "ash/wm/resize_shadow_controller.h"
16 #include "ash/wm/window_animations.h" 18 #include "ash/wm/window_animations.h"
17 #include "ash/wm/window_properties.h" 19 #include "ash/wm/window_properties.h"
18 #include "ash/wm/window_state_aura.h" 20 #include "ash/wm/window_state_aura.h"
19 #include "ash/wm/window_util.h" 21 #include "ash/wm/window_util.h"
20 #include "ui/aura/client/aura_constants.h" 22 #include "ui/aura/client/aura_constants.h"
21 #include "ui/aura/client/window_tree_client.h" 23 #include "ui/aura/client/window_tree_client.h"
22 #include "ui/aura/layout_manager.h" 24 #include "ui/aura/layout_manager.h"
23 #include "ui/aura/window.h" 25 #include "ui/aura/window.h"
24 #include "ui/aura/window_delegate.h" 26 #include "ui/aura/window_delegate.h"
25 #include "ui/aura/window_property.h" 27 #include "ui/aura/window_property.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 487 }
486 488
487 std::vector<WmWindow*> WmWindowAura::GetChildren() { 489 std::vector<WmWindow*> WmWindowAura::GetChildren() {
488 return FromAuraWindows(window_->children()); 490 return FromAuraWindows(window_->children());
489 } 491 }
490 492
491 WmWindow* WmWindowAura::GetChildByShellWindowId(int id) { 493 WmWindow* WmWindowAura::GetChildByShellWindowId(int id) {
492 return Get(window_->GetChildById(id)); 494 return Get(window_->GetChildById(id));
493 } 495 }
494 496
497 void WmWindowAura::ShowResizeShadow(int component) {
498 ResizeShadowController* resize_shadow_controller =
499 Shell::GetInstance()->resize_shadow_controller();
500 if (resize_shadow_controller)
501 resize_shadow_controller->ShowShadow(window_, component);
502 }
503
504 void WmWindowAura::HideResizeShadow() {
505 ResizeShadowController* resize_shadow_controller =
506 Shell::GetInstance()->resize_shadow_controller();
507 if (resize_shadow_controller)
508 resize_shadow_controller->HideShadow(window_);
509 }
510
495 void WmWindowAura::SnapToPixelBoundaryIfNecessary() { 511 void WmWindowAura::SnapToPixelBoundaryIfNecessary() {
496 SnapWindowToPixelBoundary(window_); 512 SnapWindowToPixelBoundary(window_);
497 } 513 }
498 514
499 void WmWindowAura::AddObserver(WmWindowObserver* observer) { 515 void WmWindowAura::AddObserver(WmWindowObserver* observer) {
500 observers_.AddObserver(observer); 516 observers_.AddObserver(observer);
501 } 517 }
502 518
503 void WmWindowAura::RemoveObserver(WmWindowObserver* observer) { 519 void WmWindowAura::RemoveObserver(WmWindowObserver* observer) {
504 observers_.RemoveObserver(observer); 520 observers_.RemoveObserver(observer);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 572 }
557 573
558 void WmWindowAura::OnWindowVisibilityChanging(aura::Window* window, 574 void WmWindowAura::OnWindowVisibilityChanging(aura::Window* window,
559 bool visible) { 575 bool visible) {
560 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 576 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
561 OnWindowVisibilityChanging(this, visible)); 577 OnWindowVisibilityChanging(this, visible));
562 } 578 }
563 579
564 } // namespace wm 580 } // namespace wm
565 } // namespace ash 581 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/aura/wm_window_aura.h ('k') | ash/wm/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698