OLD | NEW |
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 Loading... |
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::kDisableNewOobe)) { |
207 if (BaseLoginDisplayHost::default_host() && | |
208 !command_line->HasSwitch(switches::kDisableNewOobe)) { | |
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 aura::Env::GetInstance()->set_render_white_bg(true); | 356 aura::Env::GetInstance()->set_render_white_bg(true); |
359 } | 357 } |
360 | 358 |
361 void WebUILoginView::ReturnFocus(bool reverse) { | 359 void WebUILoginView::ReturnFocus(bool reverse) { |
362 // Return the focus to the web contents. | 360 // Return the focus to the web contents. |
363 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 361 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
364 GetWidget()->Activate(); | 362 GetWidget()->Activate(); |
365 } | 363 } |
366 | 364 |
367 } // namespace chromeos | 365 } // namespace chromeos |
OLD | NEW |