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

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

Powered by Google App Engine
This is Rietveld 408576698