| 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 "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
| 10 #include "content/public/common/web_preferences.h" | 10 #include "content/public/common/web_preferences.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 void WebViewPlugin::startDragging(WebLocalFrame*, | 257 void WebViewPlugin::startDragging(WebLocalFrame*, |
| 258 const WebDragData&, | 258 const WebDragData&, |
| 259 WebDragOperationsMask, | 259 WebDragOperationsMask, |
| 260 const WebImage&, | 260 const WebImage&, |
| 261 const WebPoint&) { | 261 const WebPoint&) { |
| 262 // Immediately stop dragging. | 262 // Immediately stop dragging. |
| 263 web_view_->dragSourceSystemDragEnded(); | 263 web_view_->dragSourceSystemDragEnded(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void WebViewPlugin::convertViewportToScreen(blink::WebRect* rect) { |
| 267 // TODO(oshima): Figure out what to do. |
| 268 NOTIMPLEMENTED(); |
| 269 } |
| 270 |
| 266 bool WebViewPlugin::allowsBrokenNullLayerTreeView() const { | 271 bool WebViewPlugin::allowsBrokenNullLayerTreeView() const { |
| 267 return true; | 272 return true; |
| 268 } | 273 } |
| 269 | 274 |
| 270 void WebViewPlugin::didInvalidateRect(const WebRect& rect) { | 275 void WebViewPlugin::didInvalidateRect(const WebRect& rect) { |
| 271 if (container_) | 276 if (container_) |
| 272 container_->invalidateRect(rect); | 277 container_->invalidateRect(rect); |
| 273 } | 278 } |
| 274 | 279 |
| 275 void WebViewPlugin::didUpdateLayoutSize(const WebSize&) { | 280 void WebViewPlugin::didUpdateLayoutSize(const WebSize&) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // By default RenderViewObservers are destroyed along with the RenderView. | 317 // By default RenderViewObservers are destroyed along with the RenderView. |
| 313 // WebViewPlugin has a custom destruction mechanism, so we disable this. | 318 // WebViewPlugin has a custom destruction mechanism, so we disable this. |
| 314 } | 319 } |
| 315 | 320 |
| 316 void WebViewPlugin::OnZoomLevelChanged() { | 321 void WebViewPlugin::OnZoomLevelChanged() { |
| 317 if (container_) { | 322 if (container_) { |
| 318 web_view_->setZoomLevel( | 323 web_view_->setZoomLevel( |
| 319 blink::WebView::zoomFactorToZoomLevel(container_->pageZoomFactor())); | 324 blink::WebView::zoomFactorToZoomLevel(container_->pageZoomFactor())); |
| 320 } | 325 } |
| 321 } | 326 } |
| OLD | NEW |