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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 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/window_cycle_controller_unittest.cc ('k') | ash/wm/window_positioner.cc » ('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/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 527
528 views::Widget* widget = new views::Widget; 528 views::Widget* widget = new views::Widget;
529 views::Widget::InitParams params; 529 views::Widget::InitParams params;
530 params.delegate = cycle_view_; 530 params.delegate = cycle_view_;
531 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; 531 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS;
532 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 532 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
533 params.accept_events = true; 533 params.accept_events = true;
534 params.name = "WindowCycleList (Alt+Tab)"; 534 params.name = "WindowCycleList (Alt+Tab)";
535 // TODO(estade): make sure nothing untoward happens when the lock screen 535 // TODO(estade): make sure nothing untoward happens when the lock screen
536 // or a system modal dialog is shown. 536 // or a system modal dialog is shown.
537 WmWindow* root_window = Shell::GetWmRootWindowForNewWindows(); 537 aura::Window* root_window = Shell::GetRootWindowForNewWindows();
538 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( 538 GetRootWindowController(root_window)
539 widget, kShellWindowId_OverlayContainer, &params); 539 ->ConfigureWidgetInitParamsForContainer(
540 gfx::Rect widget_rect = root_window->GetDisplayNearestWindow().bounds(); 540 widget, kShellWindowId_OverlayContainer, &params);
541 gfx::Rect widget_rect = display::Screen::GetScreen()
542 ->GetDisplayNearestWindow(root_window)
543 .bounds();
541 const int widget_height = cycle_view_->GetPreferredSize().height(); 544 const int widget_height = cycle_view_->GetPreferredSize().height();
542 widget_rect.set_y(widget_rect.y() + 545 widget_rect.set_y(widget_rect.y() +
543 (widget_rect.height() - widget_height) / 2); 546 (widget_rect.height() - widget_height) / 2);
544 widget_rect.set_height(widget_height); 547 widget_rect.set_height(widget_height);
545 params.bounds = widget_rect; 548 params.bounds = widget_rect;
546 widget->Init(params); 549 widget->Init(params);
547 550
548 screen_observer_.Add(display::Screen::GetScreen()); 551 screen_observer_.Add(display::Screen::GetScreen());
549 widget->Show(); 552 widget->Show();
550 cycle_ui_widget_ = widget; 553 cycle_ui_widget_ = widget;
551 } 554 }
552 555
553 } // namespace ash 556 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698