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

Side by Side Diff: ui/views/controls/webview/webview.cc

Issue 1731373002: Allow to have a transparent UA dependent background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 "ui/views/controls/webview/webview.h" 5 #include "ui/views/controls/webview/webview.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/browser/browser_accessibility_state.h" 10 #include "content/public/browser/browser_accessibility_state.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 if (!contents) { 394 if (!contents) {
395 content::WebContents::CreateParams create_params( 395 content::WebContents::CreateParams create_params(
396 browser_context, NULL); 396 browser_context, NULL);
397 return content::WebContents::Create(create_params); 397 return content::WebContents::Create(create_params);
398 } 398 }
399 399
400 return contents; 400 return contents;
401 } 401 }
402 402
403 void WebView::OnPaintBackground(gfx::Canvas* canvas) {
404 if (!GetWebContents()->GetRenderWidgetHostView()->GetBackgroundOpaque())
405 return;
406
407 View::OnPaintBackground(canvas);
408 }
409
403 } // namespace views 410 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/webview/webview.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698