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

Side by Side Diff: ash/system/palette/palette_utils.cc

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 years, 8 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 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/system/palette/palette_utils.h" 5 #include "ash/system/palette/palette_utils.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shelf/wm_shelf.h" 8 #include "ash/shelf/wm_shelf.h"
9 #include "ash/shell_port.h"
9 #include "ash/system/palette/palette_tray.h" 10 #include "ash/system/palette/palette_tray.h"
10 #include "ash/system/status_area_widget.h" 11 #include "ash/system/status_area_widget.h"
11 #include "ash/wm_shell.h"
12 #include "ash/wm_window.h" 12 #include "ash/wm_window.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/sys_info.h" 14 #include "base/sys_info.h"
15 #include "ui/events/devices/input_device_manager.h" 15 #include "ui/events/devices/input_device_manager.h"
16 #include "ui/events/devices/touchscreen_device.h" 16 #include "ui/events/devices/touchscreen_device.h"
17 #include "ui/gfx/geometry/point.h" 17 #include "ui/gfx/geometry/point.h"
18 18
19 namespace ash { 19 namespace ash {
20 namespace palette_utils { 20 namespace palette_utils {
21 21
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 return false; 55 return false;
56 } 56 }
57 57
58 bool IsPaletteEnabledOnEveryDisplay() { 58 bool IsPaletteEnabledOnEveryDisplay() {
59 return base::CommandLine::ForCurrentProcess()->HasSwitch( 59 return base::CommandLine::ForCurrentProcess()->HasSwitch(
60 switches::kAshEnablePaletteOnAllDisplays); 60 switches::kAshEnablePaletteOnAllDisplays);
61 } 61 }
62 62
63 bool PaletteContainsPointInScreen(const gfx::Point& point) { 63 bool PaletteContainsPointInScreen(const gfx::Point& point) {
64 for (WmWindow* window : WmShell::Get()->GetAllRootWindows()) { 64 for (WmWindow* window : ShellPort::Get()->GetAllRootWindows()) {
65 PaletteTray* palette_tray = 65 PaletteTray* palette_tray =
66 WmShelf::ForWindow(window)->GetStatusAreaWidget()->palette_tray(); 66 WmShelf::ForWindow(window)->GetStatusAreaWidget()->palette_tray();
67 if (palette_tray && palette_tray->ContainsPointInScreen(point)) 67 if (palette_tray && palette_tray->ContainsPointInScreen(point))
68 return true; 68 return true;
69 } 69 }
70 70
71 return false; 71 return false;
72 } 72 }
73 73
74 } // namespace palette_utils 74 } // namespace palette_utils
75 } // namespace ash 75 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698