OLD | NEW |
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 "chrome/browser/chromeos/login/ui/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/ui/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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 gfx::NativeWindow WebUILoginView::GetNativeWindow() const { | 273 gfx::NativeWindow WebUILoginView::GetNativeWindow() const { |
274 return GetWidget()->GetNativeWindow(); | 274 return GetWidget()->GetNativeWindow(); |
275 } | 275 } |
276 | 276 |
277 void WebUILoginView::LoadURL(const GURL & url) { | 277 void WebUILoginView::LoadURL(const GURL & url) { |
278 webui_login_->LoadInitialURL(url); | 278 webui_login_->LoadInitialURL(url); |
279 webui_login_->RequestFocus(); | 279 webui_login_->RequestFocus(); |
280 | 280 |
281 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track | 281 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track |
282 // when RenderView is created. | 282 // when RenderView is created. |
283 GetWebContents()->GetRenderViewHost()->GetView()->SetBackgroundColor( | 283 GetWebContents()->GetRenderViewHost()->GetView()->SetBackgroundOpaque(false); |
284 SK_ColorTRANSPARENT); | |
285 } | 284 } |
286 | 285 |
287 content::WebUI* WebUILoginView::GetWebUI() { | 286 content::WebUI* WebUILoginView::GetWebUI() { |
288 return webui_login_->web_contents()->GetWebUI(); | 287 return webui_login_->web_contents()->GetWebUI(); |
289 } | 288 } |
290 | 289 |
291 content::WebContents* WebUILoginView::GetWebContents() { | 290 content::WebContents* WebUILoginView::GetWebContents() { |
292 return webui_login_->web_contents(); | 291 return webui_login_->web_contents(); |
293 } | 292 } |
294 | 293 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 webui_visible_ = true; | 496 webui_visible_ = true; |
498 } | 497 } |
499 | 498 |
500 void WebUILoginView::ReturnFocus(bool reverse) { | 499 void WebUILoginView::ReturnFocus(bool reverse) { |
501 // Return the focus to the web contents. | 500 // Return the focus to the web contents. |
502 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 501 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
503 GetWidget()->Activate(); | 502 GetWidget()->Activate(); |
504 } | 503 } |
505 | 504 |
506 } // namespace chromeos | 505 } // namespace chromeos |
OLD | NEW |