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

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 1015023002: Plugin Power Saver: Throttle 'large' plugins that appear small. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc ('k') | no next file » | 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/render_widget_fullscreen_pepper.h" 5 #include "content/renderer/render_widget_fullscreen_pepper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 virtual WebSize size() { 148 virtual WebSize size() {
149 return size_; 149 return size_;
150 } 150 }
151 151
152 virtual void resize(const WebSize& size) { 152 virtual void resize(const WebSize& size) {
153 if (!widget_->plugin()) 153 if (!widget_->plugin())
154 return; 154 return;
155 155
156 size_ = size; 156 size_ = size;
157 WebRect plugin_rect(0, 0, size_.width, size_.height); 157 WebRect plugin_rect(0, 0, size_.width, size_.height);
158 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, 158 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect,
159 std::vector<gfx::Rect>()); 159 std::vector<gfx::Rect>());
160 widget_->Invalidate(); 160 widget_->Invalidate();
161 } 161 }
162 162
163 virtual void themeChanged() { 163 virtual void themeChanged() {
164 NOTIMPLEMENTED(); 164 NOTIMPLEMENTED();
165 } 165 }
166 166
167 virtual bool handleInputEvent(const WebInputEvent& event) { 167 virtual bool handleInputEvent(const WebInputEvent& event) {
168 if (!widget_->plugin()) 168 if (!widget_->plugin())
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 389
390 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( 390 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor(
391 float device_scale_factor) { 391 float device_scale_factor) {
392 RenderWidget::SetDeviceScaleFactor(device_scale_factor); 392 RenderWidget::SetDeviceScaleFactor(device_scale_factor);
393 if (compositor_) 393 if (compositor_)
394 compositor_->setDeviceScaleFactor(device_scale_factor); 394 compositor_->setDeviceScaleFactor(device_scale_factor);
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698