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

Side by Side Diff: chrome/browser/chromeos/login/webui_login_view.cc

Issue 10810039: 2nd display should show the same background as login/lock screen: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 (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 "chrome/browser/chromeos/login/webui_login_view.h" 5 #include "chrome/browser/chromeos/login/webui_login_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 void WebUILoginView::UpdateWindowType() { 198 void WebUILoginView::UpdateWindowType() {
199 } 199 }
200 200
201 void WebUILoginView::LoadURL(const GURL & url) { 201 void WebUILoginView::LoadURL(const GURL & url) {
202 webui_login_->LoadInitialURL(url); 202 webui_login_->LoadInitialURL(url);
203 webui_login_->RequestFocus(); 203 webui_login_->RequestFocus();
204 204
205 CommandLine* command_line = CommandLine::ForCurrentProcess(); 205 CommandLine* command_line = CommandLine::ForCurrentProcess();
206 // Only enable transparency on sign in screen, not on lock screen. 206 if (command_line->HasSwitch(switches::kEnableNewOobe)) {
207 if (BaseLoginDisplayHost::default_host() &&
208 command_line->HasSwitch(switches::kEnableNewOobe)) {
209 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track 207 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track
210 // when RenderView is created. 208 // when RenderView is created.
211 // Use a background with transparency to trigger transparency in Webkit. 209 // Use a background with transparency to trigger transparency in Webkit.
212 SkBitmap background; 210 SkBitmap background;
213 background.setConfig(SkBitmap::kARGB_8888_Config, 1, 1); 211 background.setConfig(SkBitmap::kARGB_8888_Config, 1, 1);
214 background.allocPixels(); 212 background.allocPixels();
215 background.eraseARGB(0x00, 0x00, 0x00, 0x00); 213 background.eraseARGB(0x00, 0x00, 0x00, 0x00);
216 content::RenderViewHost* host = 214 content::RenderViewHost* host =
217 tab_contents_->web_contents()->GetRenderViewHost(); 215 tab_contents_->web_contents()->GetRenderViewHost();
218 host->GetView()->SetBackground(background); 216 host->GetView()->SetBackground(background);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 aura::Env::GetInstance()->set_render_white_bg(true); 353 aura::Env::GetInstance()->set_render_white_bg(true);
356 } 354 }
357 355
358 void WebUILoginView::ReturnFocus(bool reverse) { 356 void WebUILoginView::ReturnFocus(bool reverse) {
359 // Return the focus to the web contents. 357 // Return the focus to the web contents.
360 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 358 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
361 GetWidget()->Activate(); 359 GetWidget()->Activate();
362 } 360 }
363 361
364 } // namespace chromeos 362 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698