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

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

Issue 714003002: Allow changing top controls height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 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
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/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return gfx::Rect(content_view_core_->GetViewSize()); 535 return gfx::Rect(content_view_core_->GetViewSize());
536 } 536 }
537 537
538 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { 538 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
539 if (!content_view_core_) 539 if (!content_view_core_)
540 return gfx::Size(); 540 return gfx::Size();
541 541
542 return content_view_core_->GetPhysicalBackingSize(); 542 return content_view_core_->GetPhysicalBackingSize();
543 } 543 }
544 544
545 float RenderWidgetHostViewAndroid::GetTopControlsLayoutHeight() const { 545 bool RenderWidgetHostViewAndroid::GetTopControlsShrinkBlinkSize() const {
546 if (!content_view_core_)
547 return false;
548
549 // Whether or not Blink's viewport size should be shrunk by the height of the
550 // URL-bar.
551 return content_view_core_->GetTopControlsShrinkBlinkSize();
552 }
553
554 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const {
546 if (!content_view_core_) 555 if (!content_view_core_)
547 return 0.f; 556 return 0.f;
548 557
549 // The amount that the viewport size given to Blink is shrunk by the URL-bar. 558 // The height of the top controls.
550 return content_view_core_->GetTopControlsLayoutHeightDip(); 559 return content_view_core_->GetTopControlsHeightDip();
551 } 560 }
552 561
553 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { 562 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
554 // There are no cursors on Android. 563 // There are no cursors on Android.
555 } 564 }
556 565
557 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { 566 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) {
558 // Do nothing. The UI notification is handled through ContentViewClient which 567 // Do nothing. The UI notification is handled through ContentViewClient which
559 // is TabContentsDelegate. 568 // is TabContentsDelegate.
560 } 569 }
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 results->orientationAngle = display.RotationAsDegree(); 1754 results->orientationAngle = display.RotationAsDegree();
1746 results->orientationType = 1755 results->orientationType =
1747 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1756 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1748 gfx::DeviceDisplayInfo info; 1757 gfx::DeviceDisplayInfo info;
1749 results->depth = info.GetBitsPerPixel(); 1758 results->depth = info.GetBitsPerPixel();
1750 results->depthPerComponent = info.GetBitsPerComponent(); 1759 results->depthPerComponent = info.GetBitsPerComponent();
1751 results->isMonochrome = (results->depthPerComponent == 0); 1760 results->isMonochrome = (results->depthPerComponent == 0);
1752 } 1761 }
1753 1762
1754 } // namespace content 1763 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698