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

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: Rebase Created 7 years, 11 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 | 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 float maximum_scale) { 586 float maximum_scale) {
587 if (content_view_core_) 587 if (content_view_core_)
588 content_view_core_->UpdatePageScaleLimits(minimum_scale, maximum_scale); 588 content_view_core_->UpdatePageScaleLimits(minimum_scale, maximum_scale);
589 } 589 }
590 590
591 void RenderWidgetHostViewAndroid::UpdateFrameInfo( 591 void RenderWidgetHostViewAndroid::UpdateFrameInfo(
592 const gfx::Vector2d& scroll_offset, 592 const gfx::Vector2d& scroll_offset,
593 float page_scale_factor, 593 float page_scale_factor,
594 float min_page_scale_factor, 594 float min_page_scale_factor,
595 float max_page_scale_factor, 595 float max_page_scale_factor,
596 const gfx::Size& content_size) { 596 const gfx::Size& content_size,
597 const gfx::Vector2dF& controls_offset,
598 const gfx::Vector2dF& content_offset) {
597 if (content_view_core_) { 599 if (content_view_core_) {
598 content_view_core_->UpdateContentSize(content_size.width(), 600 content_view_core_->UpdateContentSize(content_size.width(),
599 content_size.height()); 601 content_size.height());
600 content_view_core_->UpdatePageScaleLimits(min_page_scale_factor, 602 content_view_core_->UpdatePageScaleLimits(min_page_scale_factor,
601 max_page_scale_factor); 603 max_page_scale_factor);
602 content_view_core_->UpdateScrollOffsetAndPageScaleFactor(scroll_offset.x(), 604 content_view_core_->UpdateScrollOffsetAndPageScaleFactor(scroll_offset.x(),
603 scroll_offset.y(), 605 scroll_offset.y(),
604 page_scale_factor); 606 page_scale_factor);
607 content_view_core_->UpdateOffsetsForFullscreen(controls_offset.y(),
608 content_offset.y());
605 } 609 }
606 } 610 }
607 611
608 void RenderWidgetHostViewAndroid::SetContentViewCore( 612 void RenderWidgetHostViewAndroid::SetContentViewCore(
609 ContentViewCoreImpl* content_view_core) { 613 ContentViewCoreImpl* content_view_core) {
610 if (content_view_core_ && is_layer_attached_) 614 if (content_view_core_ && is_layer_attached_)
611 content_view_core_->RemoveLayer(layer_); 615 content_view_core_->RemoveLayer(layer_);
612 616
613 content_view_core_ = content_view_core; 617 content_view_core_ = content_view_core;
614 if (content_view_core_ && is_layer_attached_) 618 if (content_view_core_ && is_layer_attached_)
(...skipping 25 matching lines...) Expand all
640 // RenderWidgetHostView, public: 644 // RenderWidgetHostView, public:
641 645
642 // static 646 // static
643 RenderWidgetHostView* 647 RenderWidgetHostView*
644 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 648 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
645 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 649 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
646 return new RenderWidgetHostViewAndroid(rwhi, NULL); 650 return new RenderWidgetHostViewAndroid(rwhi, NULL);
647 } 651 }
648 652
649 } // namespace content 653 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698