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

Side by Side Diff: ash/wm/overview/window_selector.cc

Issue 294963004: Revert of 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/overview/window_selector.h" 5 #include "ash/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/accessibility_delegate.h" 9 #include "ash/accessibility_delegate.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 // TODO(flackr): StopPropogation prevents generation of gesture events. 319 // TODO(flackr): StopPropogation prevents generation of gesture events.
320 // We should find a better way to prevent events from being delivered to 320 // We should find a better way to prevent events from being delivered to
321 // the window, perhaps a transparent window in front of the target window 321 // the window, perhaps a transparent window in front of the target window
322 // or using EventClientImpl::CanProcessEventsWithinSubtree and then a tap 322 // or using EventClientImpl::CanProcessEventsWithinSubtree and then a tap
323 // gesture could be used to activate the window. 323 // gesture could be used to activate the window.
324 event->SetHandled(); 324 event->SetHandled();
325 SelectWindow(target); 325 SelectWindow(target);
326 } 326 }
327 327
328 void WindowSelector::OnDisplayBoundsChanged(const gfx::Display& display) {
329 PositionWindows(/* animate */ false);
330 }
331
328 void WindowSelector::OnDisplayAdded(const gfx::Display& display) { 332 void WindowSelector::OnDisplayAdded(const gfx::Display& display) {
329 } 333 }
330 334
331 void WindowSelector::OnDisplayRemoved(const gfx::Display& display) { 335 void WindowSelector::OnDisplayRemoved(const gfx::Display& display) {
332 } 336 }
333 337
334 void WindowSelector::OnDisplayMetricsChanged(const gfx::Display& display,
335 uint32_t metrics) {
336 PositionWindows(/* animate */ false);
337 }
338
339 void WindowSelector::OnWindowAdded(aura::Window* new_window) { 338 void WindowSelector::OnWindowAdded(aura::Window* new_window) {
340 if (new_window->type() != ui::wm::WINDOW_TYPE_NORMAL && 339 if (new_window->type() != ui::wm::WINDOW_TYPE_NORMAL &&
341 new_window->type() != ui::wm::WINDOW_TYPE_PANEL) { 340 new_window->type() != ui::wm::WINDOW_TYPE_PANEL) {
342 return; 341 return;
343 } 342 }
344 343
345 for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) { 344 for (size_t i = 0; i < kSwitchableWindowContainerIdsLength; ++i) {
346 if (new_window->parent()->id() == kSwitchableWindowContainerIds[i] && 345 if (new_window->parent()->id() == kSwitchableWindowContainerIds[i] &&
347 !::wm::GetTransientParent(new_window)) { 346 !::wm::GetTransientParent(new_window)) {
348 // The new window is in one of the switchable containers, abort overview. 347 // The new window is in one of the switchable containers, abort overview.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 for (WindowSelectorItemList::iterator iter = windows_.begin(); 574 for (WindowSelectorItemList::iterator iter = windows_.begin();
576 iter != windows_.end(); ++iter) { 575 iter != windows_.end(); ++iter) {
577 aura::Window* selected = (*iter)->TargetedWindow(window); 576 aura::Window* selected = (*iter)->TargetedWindow(window);
578 if (selected) 577 if (selected)
579 return selected; 578 return selected;
580 } 579 }
581 return NULL; 580 return NULL;
582 } 581 }
583 582
584 } // namespace ash 583 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector.h ('k') | chrome/browser/extensions/api/system_info/system_info_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698