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

Side by Side Diff: ash/common/wm/window_cycle_list.cc

Issue 2804523002: Fix mistmached |GetDisplayNearest{Window,View}| param type (Closed)
Patch Set: window 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 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/common/wm/window_cycle_list.h" 5 #include "ash/common/wm/window_cycle_list.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "ash/common/wm/mru_window_tracker.h" 10 #include "ash/common/wm/mru_window_tracker.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 496
497 void WindowCycleList::OnDisplayAdded(const display::Display& new_display) {} 497 void WindowCycleList::OnDisplayAdded(const display::Display& new_display) {}
498 498
499 void WindowCycleList::OnDisplayRemoved(const display::Display& old_display) {} 499 void WindowCycleList::OnDisplayRemoved(const display::Display& old_display) {}
500 500
501 void WindowCycleList::OnDisplayMetricsChanged(const display::Display& display, 501 void WindowCycleList::OnDisplayMetricsChanged(const display::Display& display,
502 uint32_t changed_metrics) { 502 uint32_t changed_metrics) {
503 if (cycle_ui_widget_ && 503 if (cycle_ui_widget_ &&
504 display.id() == 504 display.id() ==
505 display::Screen::GetScreen() 505 display::Screen::GetScreen()
506 ->GetDisplayNearestWindow(cycle_ui_widget_->GetNativeView()) 506 ->GetDisplayNearestWindow(cycle_ui_widget_->GetNativeWindow())
507 .id() && 507 .id() &&
508 (changed_metrics & (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_ROTATION))) { 508 (changed_metrics & (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_ROTATION))) {
509 Shell::Get()->window_cycle_controller()->CancelCycling(); 509 Shell::Get()->window_cycle_controller()->CancelCycling();
510 // |this| is deleted. 510 // |this| is deleted.
511 return; 511 return;
512 } 512 }
513 } 513 }
514 514
515 bool WindowCycleList::ShouldShowUi() { 515 bool WindowCycleList::ShouldShowUi() {
516 return windows_.size() > 1; 516 return windows_.size() > 1;
(...skipping 25 matching lines...) Expand all
542 widget_rect.set_height(widget_height); 542 widget_rect.set_height(widget_height);
543 params.bounds = widget_rect; 543 params.bounds = widget_rect;
544 widget->Init(params); 544 widget->Init(params);
545 545
546 screen_observer_.Add(display::Screen::GetScreen()); 546 screen_observer_.Add(display::Screen::GetScreen());
547 widget->Show(); 547 widget->Show();
548 cycle_ui_widget_ = widget; 548 cycle_ui_widget_ = widget;
549 } 549 }
550 550
551 } // namespace ash 551 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray.cc ('k') | ash/content/keyboard_overlay/keyboard_overlay_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698