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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 11552009: Add support for calculating the position of the top controls in the cc layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some unnecessary bits after addressing comments. Created 8 years 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 | Annotate | Revision Log
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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 frame.metadata.root_scroll_offset, frame.metadata.page_scale_factor); 1522 frame.metadata.root_scroll_offset, frame.metadata.page_scale_factor);
1523 gfx::SizeF content_size = ScaleSize( 1523 gfx::SizeF content_size = ScaleSize(
1524 frame.metadata.root_layer_size, frame.metadata.page_scale_factor); 1524 frame.metadata.root_layer_size, frame.metadata.page_scale_factor);
1525 1525
1526 if (view_) { 1526 if (view_) {
1527 view_->UpdateFrameInfo( 1527 view_->UpdateFrameInfo(
1528 gfx::ToRoundedVector2d(scroll_offset), 1528 gfx::ToRoundedVector2d(scroll_offset),
1529 frame.metadata.page_scale_factor, 1529 frame.metadata.page_scale_factor,
1530 frame.metadata.min_page_scale_factor, 1530 frame.metadata.min_page_scale_factor,
1531 frame.metadata.max_page_scale_factor, 1531 frame.metadata.max_page_scale_factor,
1532 gfx::ToCeiledSize(content_size)); 1532 gfx::ToCeiledSize(content_size),
1533 frame.metadata.location_bar_offset,
1534 frame.metadata.content_offset);
1533 } 1535 }
1534 #endif 1536 #endif
1535 } 1537 }
1536 1538
1537 void RenderWidgetHostImpl::OnMsgUpdateRect( 1539 void RenderWidgetHostImpl::OnMsgUpdateRect(
1538 const ViewHostMsg_UpdateRect_Params& params) { 1540 const ViewHostMsg_UpdateRect_Params& params) {
1539 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnMsgUpdateRect"); 1541 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnMsgUpdateRect");
1540 TimeTicks paint_start = TimeTicks::Now(); 1542 TimeTicks paint_start = TimeTicks::Now();
1541 1543
1542 // Update our knowledge of the RenderWidget's size. 1544 // Update our knowledge of the RenderWidget's size.
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 return; 2337 return;
2336 2338
2337 OnRenderAutoResized(new_size); 2339 OnRenderAutoResized(new_size);
2338 } 2340 }
2339 2341
2340 void RenderWidgetHostImpl::DetachDelegate() { 2342 void RenderWidgetHostImpl::DetachDelegate() {
2341 delegate_ = NULL; 2343 delegate_ = NULL;
2342 } 2344 }
2343 2345
2344 } // namespace content 2346 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698