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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 259253002: Add OnDisplayMetricsChanged in DisplayObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_orientation
Patch Set: oshima review comments Created 6 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
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/wm/maximize_mode/maximize_mode_window_manager.h" 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" 10 #include "ash/wm/maximize_mode/maximize_mode_window_state.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (!IsContainerWindow(window)) 108 if (!IsContainerWindow(window))
109 return; 109 return;
110 // Reposition all non maximizeable windows. 110 // Reposition all non maximizeable windows.
111 for (WindowToState::iterator it = window_state_map_.begin(); 111 for (WindowToState::iterator it = window_state_map_.begin();
112 it != window_state_map_.end(); 112 it != window_state_map_.end();
113 ++it) { 113 ++it) {
114 it->second->UpdateWindowPosition(wm::GetWindowState(it->first), false); 114 it->second->UpdateWindowPosition(wm::GetWindowState(it->first), false);
115 } 115 }
116 } 116 }
117 117
118 void MaximizeModeWindowManager::OnDisplayBoundsChanged(
119 const gfx::Display& display) {
120 // Nothing to do here.
121 }
122
123 void MaximizeModeWindowManager::OnDisplayAdded(const gfx::Display& display) { 118 void MaximizeModeWindowManager::OnDisplayAdded(const gfx::Display& display) {
124 DisplayConfigurationChanged(); 119 DisplayConfigurationChanged();
125 } 120 }
126 121
127 void MaximizeModeWindowManager::OnDisplayRemoved(const gfx::Display& display) { 122 void MaximizeModeWindowManager::OnDisplayRemoved(const gfx::Display& display) {
128 DisplayConfigurationChanged(); 123 DisplayConfigurationChanged();
129 } 124 }
130 125
126 void MaximizeModeWindowManager::OnDisplayMetricsChanged(
127 const gfx::Display&,
128 DisplayObserver::DisplayMetrics) {
129 // Nothing to do here.
130 }
131
131 void MaximizeModeWindowManager::OnTouchEvent(ui::TouchEvent* event) { 132 void MaximizeModeWindowManager::OnTouchEvent(ui::TouchEvent* event) {
132 if (event->type() != ui::ET_TOUCH_PRESSED) 133 if (event->type() != ui::ET_TOUCH_PRESSED)
133 return; 134 return;
134 135
135 // Find the active window (from the primary screen) to un-fullscreen. 136 // Find the active window (from the primary screen) to un-fullscreen.
136 aura::Window* window = wm::GetActiveWindow(); 137 aura::Window* window = wm::GetActiveWindow();
137 if (!window) 138 if (!window)
138 return; 139 return;
139 140
140 wm::WindowState* window_state = wm::GetWindowState(window); 141 wm::WindowState* window_state = wm::GetWindowState(window);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 RootWindowController* controller = *iter; 268 RootWindowController* controller = *iter;
268 aura::Window* container = Shell::GetContainer( 269 aura::Window* container = Shell::GetContainer(
269 controller->GetRootWindow(), kShellWindowId_DefaultContainer); 270 controller->GetRootWindow(), kShellWindowId_DefaultContainer);
270 controller->workspace_controller()->SetMaximizeBackdropDelegate( 271 controller->workspace_controller()->SetMaximizeBackdropDelegate(
271 scoped_ptr<WorkspaceLayoutManagerDelegate>( 272 scoped_ptr<WorkspaceLayoutManagerDelegate>(
272 enable ? new WorkspaceBackdropDelegate(container) : NULL)); 273 enable ? new WorkspaceBackdropDelegate(container) : NULL));
273 } 274 }
274 } 275 }
275 276
276 } // namespace ash 277 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698