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

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

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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/window_cycle_list.h" 5 #include "ash/wm/window_cycle_list.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 views::Widget* widget = new views::Widget; 527 views::Widget* widget = new views::Widget;
528 views::Widget::InitParams params; 528 views::Widget::InitParams params;
529 params.delegate = cycle_view_; 529 params.delegate = cycle_view_;
530 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; 530 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
531 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 531 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
532 params.accept_events = true; 532 params.accept_events = true;
533 params.name = "WindowCycleList (Alt+Tab)"; 533 params.name = "WindowCycleList (Alt+Tab)";
534 // TODO(estade): make sure nothing untoward happens when the lock screen 534 // TODO(estade): make sure nothing untoward happens when the lock screen
535 // or a system modal dialog is shown. 535 // or a system modal dialog is shown.
536 aura::Window* root_window = Shell::GetRootWindowForNewWindows(); 536 aura::Window* root_window = Shell::GetRootWindowForNewWindows();
537 GetRootWindowController(root_window) 537 RootWindowController::ForWindow(root_window)
538 ->ConfigureWidgetInitParamsForContainer( 538 ->ConfigureWidgetInitParamsForContainer(
539 widget, kShellWindowId_OverlayContainer, &params); 539 widget, kShellWindowId_OverlayContainer, &params);
540 gfx::Rect widget_rect = display::Screen::GetScreen() 540 gfx::Rect widget_rect = display::Screen::GetScreen()
541 ->GetDisplayNearestWindow(root_window) 541 ->GetDisplayNearestWindow(root_window)
542 .bounds(); 542 .bounds();
543 const int widget_height = cycle_view_->GetPreferredSize().height(); 543 const int widget_height = cycle_view_->GetPreferredSize().height();
544 widget_rect.set_y(widget_rect.y() + 544 widget_rect.set_y(widget_rect.y() +
545 (widget_rect.height() - widget_height) / 2); 545 (widget_rect.height() - widget_height) / 2);
546 widget_rect.set_height(widget_height); 546 widget_rect.set_height(widget_height);
547 params.bounds = widget_rect; 547 params.bounds = widget_rect;
548 widget->Init(params); 548 widget->Init(params);
549 549
550 screen_observer_.Add(display::Screen::GetScreen()); 550 screen_observer_.Add(display::Screen::GetScreen());
551 widget->Show(); 551 widget->Show();
552 cycle_ui_widget_ = widget; 552 cycle_ui_widget_ = widget;
553 } 553 }
554 554
555 } // namespace ash 555 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | chrome/browser/chromeos/accessibility/chromevox_panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698