OLD | NEW |
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 140 } |
141 | 141 |
142 virtual ~PepperWidget() {} | 142 virtual ~PepperWidget() {} |
143 | 143 |
144 // WebWidget API | 144 // WebWidget API |
145 void close() override { delete this; } | 145 void close() override { delete this; } |
146 | 146 |
147 WebSize size() override { return size_; } | 147 WebSize size() override { return size_; } |
148 | 148 |
149 void resize(const WebSize& size) override { | 149 void resize(const WebSize& size) override { |
150 if (!widget_->plugin()) | 150 if (!widget_->plugin() || size_ == size) |
151 return; | 151 return; |
152 | 152 |
153 size_ = size; | 153 size_ = size; |
154 WebRect plugin_rect(0, 0, size_.width, size_.height); | 154 WebRect plugin_rect(0, 0, size_.width, size_.height); |
155 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect, | 155 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect, |
156 std::vector<gfx::Rect>()); | 156 std::vector<gfx::Rect>()); |
157 widget_->Invalidate(); | 157 widget_->Invalidate(); |
158 } | 158 } |
159 | 159 |
160 void themeChanged() override { NOTIMPLEMENTED(); } | 160 void themeChanged() override { NOTIMPLEMENTED(); } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { | 382 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { |
383 return active_url_; | 383 return active_url_; |
384 } | 384 } |
385 | 385 |
386 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { | 386 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { |
387 if (compositor_) | 387 if (compositor_) |
388 compositor_->setDeviceScaleFactor(device_scale_factor_); | 388 compositor_->setDeviceScaleFactor(device_scale_factor_); |
389 } | 389 } |
390 | 390 |
391 } // namespace content | 391 } // namespace content |
OLD | NEW |