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

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

Issue 2391153002: Converts most of WorkspaceLayoutManager tests to use common code (Closed)
Patch Set: merge Created 4 years, 2 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/test/ash_test.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"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 bool WmWindowAura::IsBubble() { 193 bool WmWindowAura::IsBubble() {
194 views::Widget* widget = views::Widget::GetWidgetForNativeView(window_); 194 views::Widget* widget = views::Widget::GetWidgetForNativeView(window_);
195 return widget->widget_delegate()->AsBubbleDialogDelegate() != nullptr; 195 return widget->widget_delegate()->AsBubbleDialogDelegate() != nullptr;
196 } 196 }
197 197
198 ui::Layer* WmWindowAura::GetLayer() { 198 ui::Layer* WmWindowAura::GetLayer() {
199 return window_->layer(); 199 return window_->layer();
200 } 200 }
201 201
202 bool WmWindowAura::GetLayerTargetVisibility() {
203 return GetLayer()->GetTargetVisibility();
204 }
205
206 bool WmWindowAura::GetLayerVisible() {
207 return GetLayer()->visible();
208 }
209
202 display::Display WmWindowAura::GetDisplayNearestWindow() { 210 display::Display WmWindowAura::GetDisplayNearestWindow() {
203 return display::Screen::GetScreen()->GetDisplayNearestWindow(window_); 211 return display::Screen::GetScreen()->GetDisplayNearestWindow(window_);
204 } 212 }
205 213
206 bool WmWindowAura::HasNonClientArea() { 214 bool WmWindowAura::HasNonClientArea() {
207 return window_->delegate() ? true : false; 215 return window_->delegate() ? true : false;
208 } 216 }
209 217
210 int WmWindowAura::GetNonClientComponent(const gfx::Point& location) { 218 int WmWindowAura::GetNonClientComponent(const gfx::Point& location) {
211 return window_->delegate() 219 return window_->delegate()
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 627 }
620 628
621 void WmWindowAura::StackChildAbove(WmWindow* child, WmWindow* target) { 629 void WmWindowAura::StackChildAbove(WmWindow* child, WmWindow* target) {
622 window_->StackChildAbove(GetAuraWindow(child), GetAuraWindow(target)); 630 window_->StackChildAbove(GetAuraWindow(child), GetAuraWindow(target));
623 } 631 }
624 632
625 void WmWindowAura::StackChildBelow(WmWindow* child, WmWindow* target) { 633 void WmWindowAura::StackChildBelow(WmWindow* child, WmWindow* target) {
626 window_->StackChildBelow(GetAuraWindow(child), GetAuraWindow(target)); 634 window_->StackChildBelow(GetAuraWindow(child), GetAuraWindow(target));
627 } 635 }
628 636
637 void WmWindowAura::SetPinned(bool trusted) {
638 wm::PinWindow(window_, trusted);
639 }
640
629 void WmWindowAura::SetAlwaysOnTop(bool value) { 641 void WmWindowAura::SetAlwaysOnTop(bool value) {
630 window_->SetProperty(aura::client::kAlwaysOnTopKey, value); 642 window_->SetProperty(aura::client::kAlwaysOnTopKey, value);
631 } 643 }
632 644
633 bool WmWindowAura::IsAlwaysOnTop() const { 645 bool WmWindowAura::IsAlwaysOnTop() const {
634 return window_->GetProperty(aura::client::kAlwaysOnTopKey); 646 return window_->GetProperty(aura::client::kAlwaysOnTopKey);
635 } 647 }
636 648
637 void WmWindowAura::Hide() { 649 void WmWindowAura::Hide() {
638 window_->Hide(); 650 window_->Hide();
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 OnTransientChildAdded(this, Get(transient))); 898 OnTransientChildAdded(this, Get(transient)));
887 } 899 }
888 900
889 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, 901 void WmWindowAura::OnTransientChildRemoved(aura::Window* window,
890 aura::Window* transient) { 902 aura::Window* transient) {
891 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 903 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
892 OnTransientChildRemoved(this, Get(transient))); 904 OnTransientChildRemoved(this, Get(transient)));
893 } 905 }
894 906
895 } // namespace ash 907 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/test/ash_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698