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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « apps/custom_launcher_page_contents.cc ('k') | athena/content/render_view_context_menu_impl.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 (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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 LoadScreensaver(); 124 LoadScreensaver();
125 content::WebContentsObserver::Observe( 125 content::WebContentsObserver::Observe(
126 screensaver_webview_->GetWebContents()); 126 screensaver_webview_->GetWebContents());
127 } 127 }
128 128
129 void ScreensaverView::LoadScreensaver() { 129 void ScreensaverView::LoadScreensaver() {
130 screensaver_webview_->GetWebContents()->GetController().LoadURL( 130 screensaver_webview_->GetWebContents()->GetController().LoadURL(
131 url_, 131 url_,
132 content::Referrer(), 132 content::Referrer(),
133 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 133 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
134 std::string()); 134 std::string());
135 } 135 }
136 136
137 void ScreensaverView::ShowWindow() { 137 void ScreensaverView::ShowWindow() {
138 aura::Window* root_window = ash::Shell::GetPrimaryRootWindow(); 138 aura::Window* root_window = ash::Shell::GetPrimaryRootWindow();
139 gfx::Rect screen_rect = 139 gfx::Rect screen_rect =
140 Shell::GetScreen()->GetDisplayNearestWindow(root_window).bounds(); 140 Shell::GetScreen()->GetDisplayNearestWindow(root_window).bounds();
141 141
142 // We want to be the fullscreen topmost child of the root window. 142 // We want to be the fullscreen topmost child of the root window.
143 // There should be nothing ever really that should show up on top of us. 143 // There should be nothing ever really that should show up on top of us.
144 container_window_ = new views::Widget(); 144 container_window_ = new views::Widget();
145 views::Widget::InitParams params( 145 views::Widget::InitParams params(
146 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 146 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
147 params.delegate = this; 147 params.delegate = this;
148 params.parent = root_window; 148 params.parent = root_window;
149 container_window_->Init(params); 149 container_window_->Init(params);
150 150
151 container_window_->StackAtTop(); 151 container_window_->StackAtTop();
152 container_window_->SetBounds(screen_rect); 152 container_window_->SetBounds(screen_rect);
153 container_window_->Show(); 153 container_window_->Show();
154 } 154 }
155 155
156 // static 156 // static
157 ScreensaverView* ScreensaverView::GetInstance() { 157 ScreensaverView* ScreensaverView::GetInstance() {
158 return g_instance; 158 return g_instance;
159 } 159 }
160 160
161 } // namespace ash 161 } // namespace ash
OLDNEW
« no previous file with comments | « apps/custom_launcher_page_contents.cc ('k') | athena/content/render_view_context_menu_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698