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

Side by Side Diff: ash/wm/immersive_context_ash.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase 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/test/test_shell_delegate.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.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/wm/immersive_context_ash.h" 5 #include "ash/wm/immersive_context_ash.h"
6 6
7 #include "ash/shared/immersive_fullscreen_controller.h" 7 #include "ash/shared/immersive_fullscreen_controller.h"
8 #include "ash/shelf/wm_shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_port.h" 10 #include "ash/shell_port.h"
11 #include "ash/wm/window_state.h" 11 #include "ash/wm/window_state.h"
12 #include "ash/wm/window_util.h" 12 #include "ash/wm/window_util.h"
13 #include "ash/wm_window.h" 13 #include "ash/wm_window.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "ui/display/display.h" 15 #include "ui/display/display.h"
16 #include "ui/display/screen.h" 16 #include "ui/display/screen.h"
17 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
18 18
(...skipping 13 matching lines...) Expand all
32 ImmersiveFullscreenController* controller, 32 ImmersiveFullscreenController* controller,
33 bool entering) { 33 bool entering) {
34 WmWindow* window = WmWindow::Get(controller->widget()->GetNativeWindow()); 34 WmWindow* window = WmWindow::Get(controller->widget()->GetNativeWindow());
35 wm::WindowState* window_state = window->GetWindowState(); 35 wm::WindowState* window_state = window->GetWindowState();
36 // Auto hide the shelf in immersive fullscreen instead of hiding it. 36 // Auto hide the shelf in immersive fullscreen instead of hiding it.
37 window_state->set_hide_shelf_when_fullscreen(!entering); 37 window_state->set_hide_shelf_when_fullscreen(!entering);
38 // Update the window's immersive mode state for the window manager. 38 // Update the window's immersive mode state for the window manager.
39 window_state->set_in_immersive_fullscreen(entering); 39 window_state->set_in_immersive_fullscreen(entering);
40 40
41 for (aura::Window* root_window : Shell::GetAllRootWindows()) 41 for (aura::Window* root_window : Shell::GetAllRootWindows())
42 WmShelf::ForWindow(root_window)->UpdateVisibilityState(); 42 Shelf::ForWindow(root_window)->UpdateVisibilityState();
43 } 43 }
44 44
45 gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) { 45 gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) {
46 WmWindow* window = WmWindow::Get(widget->GetNativeWindow()); 46 WmWindow* window = WmWindow::Get(widget->GetNativeWindow());
47 return window->GetDisplayNearestWindow().bounds(); 47 return window->GetDisplayNearestWindow().bounds();
48 } 48 }
49 49
50 void ImmersiveContextAsh::AddPointerWatcher( 50 void ImmersiveContextAsh::AddPointerWatcher(
51 views::PointerWatcher* watcher, 51 views::PointerWatcher* watcher,
52 views::PointerWatcherEventTypes events) { 52 views::PointerWatcherEventTypes events) {
53 ShellPort::Get()->AddPointerWatcher(watcher, events); 53 ShellPort::Get()->AddPointerWatcher(watcher, events);
54 } 54 }
55 55
56 void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) { 56 void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) {
57 ShellPort::Get()->RemovePointerWatcher(watcher); 57 ShellPort::Get()->RemovePointerWatcher(watcher);
58 } 58 }
59 59
60 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() { 60 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() {
61 return wm::GetCaptureWindow() != nullptr; 61 return wm::GetCaptureWindow() != nullptr;
62 } 62 }
63 63
64 bool ImmersiveContextAsh::IsMouseEventsEnabled() { 64 bool ImmersiveContextAsh::IsMouseEventsEnabled() {
65 return ShellPort::Get()->IsMouseEventsEnabled(); 65 return ShellPort::Get()->IsMouseEventsEnabled();
66 } 66 }
67 67
68 } // namespace ash 68 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698