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

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

Issue 1844013002: Fix main thread top controls scrolling to mirror CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propertyTreesBoundsDelta
Patch Set: Override top controls resize() in classes that override resize() Created 4 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 : widget_(widget) { 139 : widget_(widget) {
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, float, bool) override {
150 //Plugins don't have top controls so ignore the last two params.
151 resize(size);
152 }
153
149 void resize(const WebSize& size) override { 154 void resize(const WebSize& size) override {
150 if (!widget_->plugin()) 155 if (!widget_->plugin())
151 return; 156 return;
152 157
153 size_ = size; 158 size_ = size;
154 WebRect plugin_rect(0, 0, size_.width, size_.height); 159 WebRect plugin_rect(0, 0, size_.width, size_.height);
155 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect, 160 widget_->plugin()->ViewChanged(plugin_rect, plugin_rect, plugin_rect,
156 std::vector<gfx::Rect>()); 161 std::vector<gfx::Rect>());
157 widget_->Invalidate(); 162 widget_->Invalidate();
158 } 163 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() { 387 GURL RenderWidgetFullscreenPepper::GetURLForGraphicsContext3D() {
383 return active_url_; 388 return active_url_;
384 } 389 }
385 390
386 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() { 391 void RenderWidgetFullscreenPepper::OnDeviceScaleFactorChanged() {
387 if (compositor_) 392 if (compositor_)
388 compositor_->setDeviceScaleFactor(device_scale_factor_); 393 compositor_->setDeviceScaleFactor(device_scale_factor_);
389 } 394 }
390 395
391 } // namespace content 396 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698