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

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

Issue 2222653002: Moves CustomFrameViewAsh to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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/aura/wm_window_aura.h ('k') | ash/common/frame/custom_frame_view_ash.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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 6
7 #include "ash/aura/aura_layout_manager_adapter.h" 7 #include "ash/aura/aura_layout_manager_adapter.h"
8 #include "ash/aura/wm_root_window_controller_aura.h" 8 #include "ash/aura/wm_root_window_controller_aura.h"
9 #include "ash/aura/wm_shell_aura.h" 9 #include "ash/aura/wm_shell_aura.h"
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
11 #include "ash/common/shell_window_ids.h" 11 #include "ash/common/shell_window_ids.h"
12 #include "ash/common/wm/window_state.h" 12 #include "ash/common/wm/window_state.h"
13 #include "ash/common/wm_layout_manager.h" 13 #include "ash/common/wm_layout_manager.h"
14 #include "ash/common/wm_transient_window_observer.h" 14 #include "ash/common/wm_transient_window_observer.h"
15 #include "ash/common/wm_window_observer.h" 15 #include "ash/common/wm_window_observer.h"
16 #include "ash/common/wm_window_property.h" 16 #include "ash/common/wm_window_property.h"
17 #include "ash/screen_util.h" 17 #include "ash/screen_util.h"
18 #include "ash/shelf/shelf_util.h" 18 #include "ash/shelf/shelf_util.h"
19 #include "ash/shell.h" 19 #include "ash/shell.h"
20 #include "ash/wm/resize_handle_window_targeter.h"
20 #include "ash/wm/resize_shadow_controller.h" 21 #include "ash/wm/resize_shadow_controller.h"
21 #include "ash/wm/window_animations.h" 22 #include "ash/wm/window_animations.h"
22 #include "ash/wm/window_mirror_view.h" 23 #include "ash/wm/window_mirror_view.h"
23 #include "ash/wm/window_properties.h" 24 #include "ash/wm/window_properties.h"
24 #include "ash/wm/window_state_aura.h" 25 #include "ash/wm/window_state_aura.h"
25 #include "ash/wm/window_util.h" 26 #include "ash/wm/window_util.h"
26 #include "base/memory/ptr_util.h" 27 #include "base/memory/ptr_util.h"
27 #include "ui/aura/client/aura_constants.h" 28 #include "ui/aura/client/aura_constants.h"
28 #include "ui/aura/client/window_tree_client.h" 29 #include "ui/aura/client/window_tree_client.h"
29 #include "ui/aura/layout_manager.h" 30 #include "ui/aura/layout_manager.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 288
288 NOTREACHED(); 289 NOTREACHED();
289 return 0; 290 return 0;
290 } 291 }
291 292
292 void WmWindowAura::SetIntProperty(WmWindowProperty key, int value) { 293 void WmWindowAura::SetIntProperty(WmWindowProperty key, int value) {
293 if (key == WmWindowProperty::SHELF_ID) { 294 if (key == WmWindowProperty::SHELF_ID) {
294 SetShelfIDForWindow(value, window_); 295 SetShelfIDForWindow(value, window_);
295 return; 296 return;
296 } 297 }
298 if (key == WmWindowProperty::TOP_VIEW_INSET) {
299 window_->SetProperty(aura::client::kTopViewInset, value);
300 return;
301 }
297 302
298 NOTREACHED(); 303 NOTREACHED();
299 } 304 }
300 305
301 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { 306 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() {
302 return window_->GetProperty(kShelfItemDetailsKey); 307 return window_->GetProperty(kShelfItemDetailsKey);
303 } 308 }
304 309
305 void WmWindowAura::SetShelfItemDetails(const ShelfItemDetails& details) { 310 void WmWindowAura::SetShelfItemDetails(const ShelfItemDetails& details) {
306 // |item_details| is owned by |window_|. 311 // |item_details| is owned by |window_|.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 resize_shadow_controller->ShowShadow(window_, component); 647 resize_shadow_controller->ShowShadow(window_, component);
643 } 648 }
644 649
645 void WmWindowAura::HideResizeShadow() { 650 void WmWindowAura::HideResizeShadow() {
646 ResizeShadowController* resize_shadow_controller = 651 ResizeShadowController* resize_shadow_controller =
647 Shell::GetInstance()->resize_shadow_controller(); 652 Shell::GetInstance()->resize_shadow_controller();
648 if (resize_shadow_controller) 653 if (resize_shadow_controller)
649 resize_shadow_controller->HideShadow(window_); 654 resize_shadow_controller->HideShadow(window_);
650 } 655 }
651 656
657 void WmWindowAura::InstallResizeHandleWindowTargeter(
658 WmImmersiveFullscreenController* immersive_fullscreen_controller) {
659 window_->SetEventTargeter(base::MakeUnique<ResizeHandleWindowTargeter>(
660 window_, immersive_fullscreen_controller));
661 }
662
652 void WmWindowAura::SetBoundsInScreenBehaviorForChildren( 663 void WmWindowAura::SetBoundsInScreenBehaviorForChildren(
653 BoundsInScreenBehavior behavior) { 664 BoundsInScreenBehavior behavior) {
654 window_->SetProperty( 665 window_->SetProperty(
655 kUsesScreenCoordinatesKey, 666 kUsesScreenCoordinatesKey,
656 behavior == BoundsInScreenBehavior::USE_SCREEN_COORDINATES); 667 behavior == BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
657 } 668 }
658 669
659 void WmWindowAura::SetSnapsChildrenToPhysicalPixelBoundary() { 670 void WmWindowAura::SetSnapsChildrenToPhysicalPixelBoundary() {
660 wm::SetSnapsChildrenToPhysicalPixelBoundary(window_); 671 wm::SetSnapsChildrenToPhysicalPixelBoundary(window_);
661 } 672 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 OnTransientChildAdded(this, Get(transient))); 824 OnTransientChildAdded(this, Get(transient)));
814 } 825 }
815 826
816 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, 827 void WmWindowAura::OnTransientChildRemoved(aura::Window* window,
817 aura::Window* transient) { 828 aura::Window* transient) {
818 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 829 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
819 OnTransientChildRemoved(this, Get(transient))); 830 OnTransientChildRemoved(this, Get(transient)));
820 } 831 }
821 832
822 } // namespace ash 833 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/frame/custom_frame_view_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698