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

Side by Side Diff: ash/screensaver/screensaver_view.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/monitor/multi_monitor_manager_unittest.cc ('k') | ash/shell.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/screensaver/screensaver_view.h" 5 #include "ash/screensaver/screensaver_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void ScreensaverView::LoadScreensaver() { 107 void ScreensaverView::LoadScreensaver() {
108 screensaver_webview_->GetWebContents()->GetController().LoadURL( 108 screensaver_webview_->GetWebContents()->GetController().LoadURL(
109 url_, 109 url_,
110 content::Referrer(), 110 content::Referrer(),
111 content::PAGE_TRANSITION_START_PAGE, 111 content::PAGE_TRANSITION_START_PAGE,
112 std::string()); 112 std::string());
113 } 113 }
114 114
115 void ScreensaverView::ShowWindow() { 115 void ScreensaverView::ShowWindow() {
116 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); 116 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow();
117 gfx::Rect screen_rect = 117 gfx::Rect screen_rect =
118 gfx::Screen::GetMonitorNearestWindow(root_window).bounds(); 118 gfx::Screen::GetMonitorNearestWindow(root_window).bounds();
119 119
120 // We want to be the fullscreen topmost child of the root window. 120 // We want to be the fullscreen topmost child of the root window.
121 // There should be nothing ever really that should show up on top of us. 121 // There should be nothing ever really that should show up on top of us.
122 container_window_ = new views::Widget(); 122 container_window_ = new views::Widget();
123 views::Widget::InitParams params( 123 views::Widget::InitParams params(
124 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 124 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
125 params.delegate = this; 125 params.delegate = this;
126 params.parent = root_window; 126 params.parent = root_window;
127 container_window_->Init(params); 127 container_window_->Init(params);
128 128
129 container_window_->StackAtTop(); 129 container_window_->StackAtTop();
130 container_window_->SetBounds(screen_rect); 130 container_window_->SetBounds(screen_rect);
131 container_window_->Show(); 131 container_window_->Show();
132 } 132 }
133 133
134 // static 134 // static
135 ScreensaverView* ScreensaverView::GetInstance() { 135 ScreensaverView* ScreensaverView::GetInstance() {
136 return g_instance; 136 return g_instance;
137 } 137 }
138 138
139 } // namespace internal 139 } // namespace internal
140 } // namespace ash 140 } // namespace ash
OLDNEW
« no previous file with comments | « ash/monitor/multi_monitor_manager_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698