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

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

Issue 1894333002: Make WebWidget::resize early out if the size doesn't change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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/render_widget.cc ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.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/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
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698