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

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: 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
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.h ('k') | ash/wm/overview/window_selector.h » ('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 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(const gfx::Display&,
127 uint32_t) {
128 // Nothing to do here.
129 }
130
131 void MaximizeModeWindowManager::OnTouchEvent(ui::TouchEvent* event) { 131 void MaximizeModeWindowManager::OnTouchEvent(ui::TouchEvent* event) {
132 if (event->type() != ui::ET_TOUCH_PRESSED) 132 if (event->type() != ui::ET_TOUCH_PRESSED)
133 return; 133 return;
134 134
135 // Find the active window (from the primary screen) to un-fullscreen. 135 // Find the active window (from the primary screen) to un-fullscreen.
136 aura::Window* window = wm::GetActiveWindow(); 136 aura::Window* window = wm::GetActiveWindow();
137 if (!window) 137 if (!window)
138 return; 138 return;
139 139
140 wm::WindowState* window_state = wm::GetWindowState(window); 140 wm::WindowState* window_state = wm::GetWindowState(window);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 RootWindowController* controller = *iter; 267 RootWindowController* controller = *iter;
268 aura::Window* container = Shell::GetContainer( 268 aura::Window* container = Shell::GetContainer(
269 controller->GetRootWindow(), kShellWindowId_DefaultContainer); 269 controller->GetRootWindow(), kShellWindowId_DefaultContainer);
270 controller->workspace_controller()->SetMaximizeBackdropDelegate( 270 controller->workspace_controller()->SetMaximizeBackdropDelegate(
271 scoped_ptr<WorkspaceLayoutManagerDelegate>( 271 scoped_ptr<WorkspaceLayoutManagerDelegate>(
272 enable ? new WorkspaceBackdropDelegate(container) : NULL)); 272 enable ? new WorkspaceBackdropDelegate(container) : NULL));
273 } 273 }
274 } 274 }
275 275
276 } // namespace ash 276 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.h ('k') | ash/wm/overview/window_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698