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

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

Powered by Google App Engine
This is Rietveld 408576698