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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 2094843002: Scale menu position back to viewport in pepper plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 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 | « no previous file | content/renderer/pepper/renderer_ppapi_host_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bit_cast.h" 10 #include "base/bit_cast.h"
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 if (module()->is_crashed()) 1634 if (module()->is_crashed())
1635 return; 1635 return;
1636 1636
1637 if (bound_compositor_) 1637 if (bound_compositor_)
1638 bound_compositor_->set_viewport_to_dip_scale(viewport_to_dip_scale_); 1638 bound_compositor_->set_viewport_to_dip_scale(viewport_to_dip_scale_);
1639 1639
1640 if (bound_graphics_2d_platform_) 1640 if (bound_graphics_2d_platform_)
1641 bound_graphics_2d_platform_->set_viewport_to_dip_scale( 1641 bound_graphics_2d_platform_->set_viewport_to_dip_scale(
1642 viewport_to_dip_scale_); 1642 viewport_to_dip_scale_);
1643 1643
1644 module_->renderer_ppapi_host()->set_viewport_to_dip_scale(
1645 viewport_to_dip_scale_);
1646
1644 // During the first view update, initialize the throttler. 1647 // During the first view update, initialize the throttler.
1645 if (!sent_initial_did_change_view_) { 1648 if (!sent_initial_did_change_view_) {
1646 if (is_flash_plugin_ && RenderThread::Get()) { 1649 if (is_flash_plugin_ && RenderThread::Get()) {
1647 RenderThread::Get()->RecordAction( 1650 RenderThread::Get()->RecordAction(
1648 base::UserMetricsAction("Flash.PluginInstanceCreated")); 1651 base::UserMetricsAction("Flash.PluginInstanceCreated"));
1649 RecordFlashSizeMetric(unobscured_rect_.width(), 1652 RecordFlashSizeMetric(unobscured_rect_.width(),
1650 unobscured_rect_.height()); 1653 unobscured_rect_.height());
1651 } 1654 }
1652 1655
1653 if (throttler_) { 1656 if (throttler_) {
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3331 } 3334 }
3332 3335
3333 void PepperPluginInstanceImpl::ConvertDIPToViewport(gfx::Rect* rect) const { 3336 void PepperPluginInstanceImpl::ConvertDIPToViewport(gfx::Rect* rect) const {
3334 rect->set_x(rect->x() / viewport_to_dip_scale_); 3337 rect->set_x(rect->x() / viewport_to_dip_scale_);
3335 rect->set_y(rect->y() / viewport_to_dip_scale_); 3338 rect->set_y(rect->y() / viewport_to_dip_scale_);
3336 rect->set_width(rect->width() / viewport_to_dip_scale_); 3339 rect->set_width(rect->width() / viewport_to_dip_scale_);
3337 rect->set_height(rect->height() / viewport_to_dip_scale_); 3340 rect->set_height(rect->height() / viewport_to_dip_scale_);
3338 } 3341 }
3339 3342
3340 } // namespace content 3343 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/renderer_ppapi_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698