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

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

Issue 12328080: Plumb physical backing size from RWHV to renderer CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust for call renamed to GetViewportSizePix() Created 7 years, 9 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_view_impl.h ('k') | content/renderer/render_widget.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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 5413 matching lines...) Expand 10 before | Expand all | Expand 10 after
5424 return; 5424 return;
5425 webview()->enableAutoResizeMode(min_size, max_size); 5425 webview()->enableAutoResizeMode(min_size, max_size);
5426 } 5426 }
5427 5427
5428 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { 5428 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) {
5429 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); 5429 DCHECK(disable_scrollbars_size_limit_.IsEmpty());
5430 if (!webview()) 5430 if (!webview())
5431 return; 5431 return;
5432 webview()->disableAutoResizeMode(); 5432 webview()->disableAutoResizeMode();
5433 5433
5434 Resize(new_size, resizer_rect_, is_fullscreen_, NO_RESIZE_ACK); 5434 Resize(new_size, physical_backing_size_, resizer_rect_, is_fullscreen_,
5435 NO_RESIZE_ACK);
5435 } 5436 }
5436 5437
5437 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { 5438 void RenderViewImpl::OnEnablePreferredSizeChangedMode() {
5438 if (send_preferred_size_changes_) 5439 if (send_preferred_size_changes_)
5439 return; 5440 return;
5440 send_preferred_size_changes_ = true; 5441 send_preferred_size_changes_ = true;
5441 5442
5442 // Start off with an initial preferred size notification (in case 5443 // Start off with an initial preferred size notification (in case
5443 // |didUpdateLayout| was already called). 5444 // |didUpdateLayout| was already called).
5444 didUpdateLayout(); 5445 didUpdateLayout();
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
5719 // will simply display a default error page. 5720 // will simply display a default error page.
5720 LoadNavigationErrorPage(frame, WebURLRequest(), original_error, html, true); 5721 LoadNavigationErrorPage(frame, WebURLRequest(), original_error, html, true);
5721 } 5722 }
5722 5723
5723 void RenderViewImpl::OnMoveOrResizeStarted() { 5724 void RenderViewImpl::OnMoveOrResizeStarted() {
5724 if (webview()) 5725 if (webview())
5725 webview()->hidePopups(); 5726 webview()->hidePopups();
5726 } 5727 }
5727 5728
5728 void RenderViewImpl::OnResize(const gfx::Size& new_size, 5729 void RenderViewImpl::OnResize(const gfx::Size& new_size,
5730 const gfx::Size& physical_backing_size,
5729 const gfx::Rect& resizer_rect, 5731 const gfx::Rect& resizer_rect,
5730 bool is_fullscreen) { 5732 bool is_fullscreen) {
5731 if (webview()) { 5733 if (webview()) {
5732 webview()->hidePopups(); 5734 webview()->hidePopups();
5733 if (send_preferred_size_changes_) { 5735 if (send_preferred_size_changes_) {
5734 webview()->mainFrame()->setCanHaveScrollbars( 5736 webview()->mainFrame()->setCanHaveScrollbars(
5735 ShouldDisplayScrollbars(new_size.width(), new_size.height())); 5737 ShouldDisplayScrollbars(new_size.width(), new_size.height()));
5736 } 5738 }
5737 UpdateScrollState(webview()->mainFrame()); 5739 UpdateScrollState(webview()->mainFrame());
5738 } 5740 }
5739 5741
5740 RenderWidget::OnResize(new_size, resizer_rect, is_fullscreen); 5742 RenderWidget::OnResize(new_size, physical_backing_size, resizer_rect,
5743 is_fullscreen);
5741 } 5744 }
5742 5745
5743 void RenderViewImpl::WillInitiatePaint() { 5746 void RenderViewImpl::WillInitiatePaint() {
5744 // Notify the pepper plugins that we're about to paint. 5747 // Notify the pepper plugins that we're about to paint.
5745 pepper_helper_->ViewWillInitiatePaint(); 5748 pepper_helper_->ViewWillInitiatePaint();
5746 } 5749 }
5747 5750
5748 void RenderViewImpl::DidInitiatePaint() { 5751 void RenderViewImpl::DidInitiatePaint() {
5749 // Notify the pepper plugins that we've painted, and are waiting to flush. 5752 // Notify the pepper plugins that we've painted, and are waiting to flush.
5750 pepper_helper_->ViewInitiatedPaint(); 5753 pepper_helper_->ViewInitiatedPaint();
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
6720 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6723 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6721 RenderProcess::current()->ReleaseTransportDIB(dib); 6724 RenderProcess::current()->ReleaseTransportDIB(dib);
6722 } 6725 }
6723 6726
6724 void RenderViewImpl::DidCommitCompositorFrame() { 6727 void RenderViewImpl::DidCommitCompositorFrame() {
6725 RenderWidget::DidCommitCompositorFrame(); 6728 RenderWidget::DidCommitCompositorFrame();
6726 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 6729 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6727 } 6730 }
6728 6731
6729 } // namespace content 6732 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698