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

Side by Side Diff: components/plugins/renderer/webview_plugin.cc

Issue 1991273003: Fire visibilityChange event on out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 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 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 "components/plugins/renderer/webview_plugin.h" 5 #include "components/plugins/renderer/webview_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 using blink::WebVector; 49 using blink::WebVector;
50 using blink::WebView; 50 using blink::WebView;
51 using content::WebPreferences; 51 using content::WebPreferences;
52 52
53 WebViewPlugin::WebViewPlugin(content::RenderView* render_view, 53 WebViewPlugin::WebViewPlugin(content::RenderView* render_view,
54 WebViewPlugin::Delegate* delegate, 54 WebViewPlugin::Delegate* delegate,
55 const WebPreferences& preferences) 55 const WebPreferences& preferences)
56 : content::RenderViewObserver(render_view), 56 : content::RenderViewObserver(render_view),
57 delegate_(delegate), 57 delegate_(delegate),
58 container_(nullptr), 58 container_(nullptr),
59 web_view_(WebView::create(this)), 59 web_view_(WebView::create(this, blink::WebPageVisibilityStateVisible)),
60 finished_loading_(false), 60 finished_loading_(false),
61 focused_(false), 61 focused_(false),
62 is_painting_(false), 62 is_painting_(false),
63 is_resizing_(false) { 63 is_resizing_(false) {
64 // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a 64 // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
65 // consistent view of our preferences. 65 // consistent view of our preferences.
66 content::RenderView::ApplyWebPreferences(preferences, web_view_); 66 content::RenderView::ApplyWebPreferences(preferences, web_view_);
67 WebLocalFrame* web_local_frame = 67 WebLocalFrame* web_local_frame =
68 WebLocalFrame::create(blink::WebTreeScopeType::Document, this); 68 WebLocalFrame::create(blink::WebTreeScopeType::Document, this);
69 web_frame_ = web_local_frame; 69 web_frame_ = web_local_frame;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 void WebViewPlugin::OnDestruct() {} 341 void WebViewPlugin::OnDestruct() {}
342 342
343 void WebViewPlugin::OnZoomLevelChanged() { 343 void WebViewPlugin::OnZoomLevelChanged() {
344 if (container_) { 344 if (container_) {
345 web_view_->setZoomLevel( 345 web_view_->setZoomLevel(
346 blink::WebView::zoomFactorToZoomLevel(container_->pageZoomFactor())); 346 blink::WebView::zoomFactorToZoomLevel(container_->pageZoomFactor()));
347 } 347 }
348 } 348 }
OLDNEW
« no previous file with comments | « chrome/renderer/prerender/prerender_helper.cc ('k') | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698