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

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

Issue 1456753002: Compute the popup location/size correctly when use-zoom-for-dsf is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 "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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698