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

Side by Side Diff: ash/shell_port.cc

Issue 2900423002: [mus+ash] Removes WmWindow from ash/wm/root_window_finder.h (Closed)
Patch Set: Remove WmWindow from ash/wm/root_window_finder.h (tab drag test) Created 3 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/shelf/shelf_view.cc ('k') | ash/test/ui_controls_factory_ash.cc » ('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/shell_port.h" 5 #include "ash/shell_port.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 29 matching lines...) Expand all
40 void ShellPort::Shutdown() {} 40 void ShellPort::Shutdown() {}
41 41
42 void ShellPort::ShowContextMenu(const gfx::Point& location_in_screen, 42 void ShellPort::ShowContextMenu(const gfx::Point& location_in_screen,
43 ui::MenuSourceType source_type) { 43 ui::MenuSourceType source_type) {
44 // Bail if there is no active user session or if the screen is locked. 44 // Bail if there is no active user session or if the screen is locked.
45 if (Shell::Get()->session_controller()->NumberOfLoggedInUsers() < 1 || 45 if (Shell::Get()->session_controller()->NumberOfLoggedInUsers() < 1 ||
46 Shell::Get()->session_controller()->IsScreenLocked()) { 46 Shell::Get()->session_controller()->IsScreenLocked()) {
47 return; 47 return;
48 } 48 }
49 49
50 WmWindow* root = wm::GetRootWindowAt(location_in_screen); 50 aura::Window* root = wm::GetRootWindowAt(location_in_screen);
51 root->GetRootWindowController()->ShowContextMenu(location_in_screen, 51 RootWindowController::ForWindow(root)->ShowContextMenu(location_in_screen,
52 source_type); 52 source_type);
53 } 53 }
54 54
55 void ShellPort::OnLockStateEvent(LockStateObserver::EventType event) { 55 void ShellPort::OnLockStateEvent(LockStateObserver::EventType event) {
56 for (auto& observer : lock_state_observers_) 56 for (auto& observer : lock_state_observers_)
57 observer.OnLockStateEvent(event); 57 observer.OnLockStateEvent(event);
58 } 58 }
59 59
60 void ShellPort::AddLockStateObserver(LockStateObserver* observer) { 60 void ShellPort::AddLockStateObserver(LockStateObserver* observer) {
61 lock_state_observers_.AddObserver(observer); 61 lock_state_observers_.AddObserver(observer);
62 } 62 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 } 113 }
114 for (aura::Window* root_window : root_windows) { 114 for (aura::Window* root_window : root_windows) {
115 RootWindowController::ForWindow(root_window) 115 RootWindowController::ForWindow(root_window)
116 ->GetSystemModalLayoutManager(removed) 116 ->GetSystemModalLayoutManager(removed)
117 ->DestroyModalBackground(); 117 ->DestroyModalBackground();
118 } 118 }
119 } 119 }
120 120
121 } // namespace ash 121 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/test/ui_controls_factory_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698