| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |