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

Side by Side Diff: ash/system/web_notification/ash_popup_alignment_delegate.cc

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/web_notification/ash_popup_alignment_delegate.h" 5 #include "ash/system/web_notification/ash_popup_alignment_delegate.h"
6 6
7 #include "ash/common/wm/wm_lookup.h" 7 #include "ash/common/wm_lookup.h"
8 #include "ash/common/wm/wm_window.h" 8 #include "ash/common/wm_window.h"
9 #include "ash/display/window_tree_host_manager.h" 9 #include "ash/display/window_tree_host_manager.h"
10 #include "ash/shelf/shelf_constants.h" 10 #include "ash/shelf/shelf_constants.h"
11 #include "ash/shelf/shelf_layout_manager.h" 11 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shelf/shelf_types.h" 12 #include "ash/shelf/shelf_types.h"
13 #include "ash/shelf/shelf_widget.h" 13 #include "ash/shelf/shelf_widget.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
16 #include "ui/display/display.h" 16 #include "ui/display/display.h"
17 #include "ui/display/screen.h" 17 #include "ui/display/screen.h"
18 #include "ui/gfx/geometry/rect.h" 18 #include "ui/gfx/geometry/rect.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void AshPopupAlignmentDelegate::RecomputeAlignment( 105 void AshPopupAlignmentDelegate::RecomputeAlignment(
106 const display::Display& display) { 106 const display::Display& display) {
107 // Nothing needs to be done. 107 // Nothing needs to be done.
108 } 108 }
109 109
110 wm::ShelfAlignment AshPopupAlignmentDelegate::GetAlignment() const { 110 wm::ShelfAlignment AshPopupAlignmentDelegate::GetAlignment() const {
111 return shelf_->GetAlignment(); 111 return shelf_->GetAlignment();
112 } 112 }
113 113
114 display::Display AshPopupAlignmentDelegate::GetCurrentDisplay() const { 114 display::Display AshPopupAlignmentDelegate::GetCurrentDisplay() const {
115 return wm::WmLookup::Get() 115 return WmLookup::Get()
116 ->GetWindowForWidget(shelf_->shelf_widget()) 116 ->GetWindowForWidget(shelf_->shelf_widget())
117 ->GetDisplayNearestWindow(); 117 ->GetDisplayNearestWindow();
118 } 118 }
119 119
120 void AshPopupAlignmentDelegate::UpdateWorkArea() { 120 void AshPopupAlignmentDelegate::UpdateWorkArea() {
121 work_area_ = shelf_->user_work_area_bounds(); 121 work_area_ = shelf_->user_work_area_bounds();
122 DoUpdateIfPossible(); 122 DoUpdateIfPossible();
123 } 123 }
124 124
125 void AshPopupAlignmentDelegate::OnDisplayWorkAreaInsetsChanged() { 125 void AshPopupAlignmentDelegate::OnDisplayWorkAreaInsetsChanged() {
(...skipping 17 matching lines...) Expand all
143 const display::Display& old_display) {} 143 const display::Display& old_display) {}
144 144
145 void AshPopupAlignmentDelegate::OnDisplayMetricsChanged( 145 void AshPopupAlignmentDelegate::OnDisplayMetricsChanged(
146 const display::Display& display, 146 const display::Display& display,
147 uint32_t metrics) { 147 uint32_t metrics) {
148 if (GetCurrentDisplay().id() == display.id()) 148 if (GetCurrentDisplay().id() == display.id())
149 UpdateWorkArea(); 149 UpdateWorkArea();
150 } 150 }
151 151
152 } // namespace ash 152 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698