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

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

Issue 274453002: Remove RenderWidget::SetBackground, change IPC to pass a bool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-setbackground: nomac Created 6 years, 7 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
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 gfx::NativeWindow WebUILoginView::GetNativeWindow() const { 253 gfx::NativeWindow WebUILoginView::GetNativeWindow() const {
254 return GetWidget()->GetNativeWindow(); 254 return GetWidget()->GetNativeWindow();
255 } 255 }
256 256
257 void WebUILoginView::LoadURL(const GURL & url) { 257 void WebUILoginView::LoadURL(const GURL & url) {
258 webui_login_->LoadInitialURL(url); 258 webui_login_->LoadInitialURL(url);
259 webui_login_->RequestFocus(); 259 webui_login_->RequestFocus();
260 260
261 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track 261 // TODO(nkostylev): Use WebContentsObserver::RenderViewCreated to track
262 // when RenderView is created. 262 // when RenderView is created.
263 // Use a background with transparency to trigger transparency in Webkit. 263 GetWebContents()->GetRenderViewHost()->GetView()->SetBackgroundOpaque(false);
264 SkBitmap background;
265 background.setConfig(SkBitmap::kARGB_8888_Config, 1, 1);
266 background.allocPixels();
267 background.eraseARGB(0x00, 0x00, 0x00, 0x00);
268 content::RenderViewHost* host = GetWebContents()->GetRenderViewHost();
269 host->GetView()->SetBackground(background);
270 } 264 }
271 265
272 content::WebUI* WebUILoginView::GetWebUI() { 266 content::WebUI* WebUILoginView::GetWebUI() {
273 return webui_login_->web_contents()->GetWebUI(); 267 return webui_login_->web_contents()->GetWebUI();
274 } 268 }
275 269
276 content::WebContents* WebUILoginView::GetWebContents() { 270 content::WebContents* WebUILoginView::GetWebContents() {
277 return webui_login_->web_contents(); 271 return webui_login_->web_contents();
278 } 272 }
279 273
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 webui_visible_ = true; 451 webui_visible_ = true;
458 } 452 }
459 453
460 void WebUILoginView::ReturnFocus(bool reverse) { 454 void WebUILoginView::ReturnFocus(bool reverse) {
461 // Return the focus to the web contents. 455 // Return the focus to the web contents.
462 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 456 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
463 GetWidget()->Activate(); 457 GetWidget()->Activate();
464 } 458 }
465 459
466 } // namespace chromeos 460 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/first_run/first_run_view.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698