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

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

Issue 2762553002: Add canUpdateLayout & canHandleGestureEvent to WebViewClient. (Closed)
Patch Set: Fix merge issues. Created 3 years, 8 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
« no previous file with comments | « components/plugins/renderer/webview_plugin.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Eliminate this once WebView is no longer a WebWidget. 260 // Eliminate this once WebView is no longer a WebWidget.
261 WebFrameWidget::create(this, web_view_, web_frame); 261 WebFrameWidget::create(this, web_view_, web_frame);
262 } 262 }
263 263
264 WebViewPlugin::WebViewHelper::~WebViewHelper() { 264 WebViewPlugin::WebViewHelper::~WebViewHelper() {
265 web_view_->close(); 265 web_view_->close();
266 } 266 }
267 267
268 bool WebViewPlugin::WebViewHelper::acceptsLoadDrops() { return false; } 268 bool WebViewPlugin::WebViewHelper::acceptsLoadDrops() { return false; }
269 269
270 bool WebViewPlugin::WebViewHelper::canHandleGestureEvent() {
271 return true;
272 }
273
274 bool WebViewPlugin::WebViewHelper::canUpdateLayout() {
275 return true;
276 }
277
270 void WebViewPlugin::WebViewHelper::setToolTipText( 278 void WebViewPlugin::WebViewHelper::setToolTipText(
271 const WebString& text, 279 const WebString& text,
272 blink::WebTextDirection hint) { 280 blink::WebTextDirection hint) {
273 if (plugin_->container_) 281 if (plugin_->container_)
274 plugin_->container_->element().setAttribute("title", text); 282 plugin_->container_->element().setAttribute("title", text);
275 } 283 }
276 284
277 void WebViewPlugin::WebViewHelper::startDragging(blink::WebReferrerPolicy, 285 void WebViewPlugin::WebViewHelper::startDragging(blink::WebReferrerPolicy,
278 const WebDragData&, 286 const WebDragData&,
279 WebDragOperationsMask, 287 WebDragOperationsMask,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 if (!delegate_) 354 if (!delegate_)
347 return; 355 return;
348 356
349 // The delegate may instantiate a new plugin. 357 // The delegate may instantiate a new plugin.
350 delegate_->OnUnobscuredRectUpdate(gfx::Rect(unobscured_rect)); 358 delegate_->OnUnobscuredRectUpdate(gfx::Rect(unobscured_rect));
351 // The delegate may have dirtied style and layout of the WebView. 359 // The delegate may have dirtied style and layout of the WebView.
352 // See for example the resizePoster function in plugin_poster.html. 360 // See for example the resizePoster function in plugin_poster.html.
353 // Run the lifecycle now so that it is clean. 361 // Run the lifecycle now so that it is clean.
354 web_view()->updateAllLifecyclePhases(); 362 web_view()->updateAllLifecyclePhases();
355 } 363 }
OLDNEW
« no previous file with comments | « components/plugins/renderer/webview_plugin.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698