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

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

Issue 2651583007: Plumbing blink::Interface{Provider|Registry} through WebLocalFrame's constructor. (Closed)
Patch Set: ScreenWakeLockTest Created 3 years, 11 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/bind.h" 10 #include "base/bind.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 WebViewPlugin::WebViewHelper::WebViewHelper( 247 WebViewPlugin::WebViewHelper::WebViewHelper(
248 WebViewPlugin* plugin, 248 WebViewPlugin* plugin,
249 const WebPreferences& preferences) : plugin_(plugin) { 249 const WebPreferences& preferences) : plugin_(plugin) {
250 web_view_ = 250 web_view_ =
251 WebView::create(this, blink::WebPageVisibilityStateVisible); 251 WebView::create(this, blink::WebPageVisibilityStateVisible);
252 // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a 252 // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
253 // consistent view of our preferences. 253 // consistent view of our preferences.
254 content::RenderView::ApplyWebPreferences(preferences, web_view_); 254 content::RenderView::ApplyWebPreferences(preferences, web_view_);
255 WebLocalFrame* web_frame = WebLocalFrame::create( 255 WebLocalFrame* web_frame = WebLocalFrame::create(
256 blink::WebTreeScopeType::Document, this); 256 blink::WebTreeScopeType::Document, this, nullptr, nullptr);
Łukasz Anforowicz 2017/01/23 23:38:16 WebViewPlugin::WebViewHelper doesn't override inte
257 web_view_->setMainFrame(web_frame); 257 web_view_->setMainFrame(web_frame);
258 // TODO(dcheng): The main frame widget currently has a special case. 258 // TODO(dcheng): The main frame widget currently has a special case.
259 // Eliminate this once WebView is no longer a WebWidget. 259 // Eliminate this once WebView is no longer a WebWidget.
260 WebFrameWidget::create(this, web_view_, web_frame); 260 WebFrameWidget::create(this, web_view_, web_frame);
261 } 261 }
262 262
263 WebViewPlugin::WebViewHelper::~WebViewHelper() { 263 WebViewPlugin::WebViewHelper::~WebViewHelper() {
264 web_view_->close(); 264 web_view_->close();
265 } 265 }
266 266
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 if (!delegate_) 345 if (!delegate_)
346 return; 346 return;
347 347
348 // The delegate may instantiate a new plugin. 348 // The delegate may instantiate a new plugin.
349 delegate_->OnUnobscuredRectUpdate(gfx::Rect(unobscured_rect)); 349 delegate_->OnUnobscuredRectUpdate(gfx::Rect(unobscured_rect));
350 // The delegate may have dirtied style and layout of the WebView. 350 // The delegate may have dirtied style and layout of the WebView.
351 // See for example the resizePoster function in plugin_poster.html. 351 // See for example the resizePoster function in plugin_poster.html.
352 // Run the lifecycle now so that it is clean. 352 // Run the lifecycle now so that it is clean.
353 web_view()->updateAllLifecyclePhases(); 353 web_view()->updateAllLifecyclePhases();
354 } 354 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698