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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.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_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 float maximum_scale) { 582 float maximum_scale) {
583 if (content_view_core_) 583 if (content_view_core_)
584 content_view_core_->UpdatePageScaleLimits(minimum_scale, maximum_scale); 584 content_view_core_->UpdatePageScaleLimits(minimum_scale, maximum_scale);
585 } 585 }
586 586
587 void RenderWidgetHostViewAndroid::UpdateFrameInfo( 587 void RenderWidgetHostViewAndroid::UpdateFrameInfo(
588 const gfx::Vector2d& scroll_offset, 588 const gfx::Vector2d& scroll_offset,
589 float page_scale_factor, 589 float page_scale_factor,
590 float min_page_scale_factor, 590 float min_page_scale_factor,
591 float max_page_scale_factor, 591 float max_page_scale_factor,
592 const gfx::Size& content_size) { 592 const gfx::Size& content_size,
593 const gfx::Vector2dF& controls_offset,
594 const gfx::Vector2dF& content_offset) {
593 if (content_view_core_) { 595 if (content_view_core_) {
594 content_view_core_->UpdateContentSize(content_size.width(), 596 content_view_core_->UpdateContentSize(content_size.width(),
595 content_size.height()); 597 content_size.height());
596 content_view_core_->UpdatePageScaleLimits(min_page_scale_factor, 598 content_view_core_->UpdatePageScaleLimits(min_page_scale_factor,
597 max_page_scale_factor); 599 max_page_scale_factor);
598 content_view_core_->UpdateScrollOffsetAndPageScaleFactor(scroll_offset.x(), 600 content_view_core_->UpdateScrollOffsetAndPageScaleFactor(scroll_offset.x(),
599 scroll_offset.y(), 601 scroll_offset.y(),
600 page_scale_factor); 602 page_scale_factor);
603 content_view_core_->UpdateOffsetsForFullscreen(controls_offset.y(),
604 content_offset.y());
601 } 605 }
602 } 606 }
603 607
604 void RenderWidgetHostViewAndroid::SetContentViewCore( 608 void RenderWidgetHostViewAndroid::SetContentViewCore(
605 ContentViewCoreImpl* content_view_core) { 609 ContentViewCoreImpl* content_view_core) {
606 if (content_view_core_ && is_layer_attached_) 610 if (content_view_core_ && is_layer_attached_)
607 content_view_core_->RemoveLayer(layer_); 611 content_view_core_->RemoveLayer(layer_);
608 612
609 content_view_core_ = content_view_core; 613 content_view_core_ = content_view_core;
610 if (content_view_core_ && is_layer_attached_) 614 if (content_view_core_ && is_layer_attached_)
(...skipping 25 matching lines...) Expand all
636 // RenderWidgetHostView, public: 640 // RenderWidgetHostView, public:
637 641
638 // static 642 // static
639 RenderWidgetHostView* 643 RenderWidgetHostView*
640 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 644 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
641 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 645 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
642 return new RenderWidgetHostViewAndroid(rwhi, NULL); 646 return new RenderWidgetHostViewAndroid(rwhi, NULL);
643 } 647 }
644 648
645 } // namespace content 649 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698