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

Side by Side Diff: chrome/browser/chromeos/first_run/first_run_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/first_run_view.h" 5 #include "chrome/browser/chromeos/first_run/first_run_view.h"
6 6
7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
8 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h" 8 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 13 matching lines...) Expand all
24 void FirstRunView::Init(content::BrowserContext* context) { 24 void FirstRunView::Init(content::BrowserContext* context) {
25 web_view_ = new views::WebView(context); 25 web_view_ = new views::WebView(context);
26 AddChildView(web_view_); 26 AddChildView(web_view_);
27 web_view_->LoadInitialURL(GURL(chrome::kChromeUIFirstRunURL)); 27 web_view_->LoadInitialURL(GURL(chrome::kChromeUIFirstRunURL));
28 28
29 content::WebContents* web_contents = web_view_->web_contents(); 29 content::WebContents* web_contents = web_view_->web_contents();
30 web_contents->SetDelegate(this); 30 web_contents->SetDelegate(this);
31 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( 31 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
32 web_contents); 32 web_contents);
33 33
34 SkBitmap background; 34 web_contents->GetRenderViewHost()->GetView()->SetBackgroundOpaque(false);
35 background.setConfig(SkBitmap::kA8_Config, 1, 1);
36 background.allocPixels();
37 background.eraseARGB(0, 0, 0, 0);
38 web_contents->GetRenderViewHost()->GetView()->
39 SetBackground(background);
40 } 35 }
41 36
42 FirstRunActor* FirstRunView::GetActor() { 37 FirstRunActor* FirstRunView::GetActor() {
43 return static_cast<FirstRunUI*>( 38 return static_cast<FirstRunUI*>(
44 web_view_->web_contents()->GetWebUI()->GetController())->get_actor(); 39 web_view_->web_contents()->GetWebUI()->GetController())->get_actor();
45 } 40 }
46 41
47 void FirstRunView::Layout() { 42 void FirstRunView::Layout() {
48 web_view_->SetBoundsRect(bounds()); 43 web_view_->SetBoundsRect(bounds());
49 } 44 }
(...skipping 16 matching lines...) Expand all
66 content::WebContents* source, 61 content::WebContents* source,
67 const blink::WebGestureEvent& event) { 62 const blink::WebGestureEvent& event) {
68 // Disable pinch zooming. 63 // Disable pinch zooming.
69 return event.type == blink::WebGestureEvent::GesturePinchBegin || 64 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
70 event.type == blink::WebGestureEvent::GesturePinchUpdate || 65 event.type == blink::WebGestureEvent::GesturePinchUpdate ||
71 event.type == blink::WebGestureEvent::GesturePinchEnd; 66 event.type == blink::WebGestureEvent::GesturePinchEnd;
72 } 67 }
73 68
74 } // namespace chromeos 69 } // namespace chromeos
75 70
OLDNEW
« no previous file with comments | « apps/ui/views/native_app_window_views.cc ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698