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

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

Powered by Google App Engine
This is Rietveld 408576698