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

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: Some more fixes Created 6 years, 1 month 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 return gfx::Rect(content_view_core_->GetViewSize()); 538 return gfx::Rect(content_view_core_->GetViewSize());
539 } 539 }
540 540
541 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { 541 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
542 if (!content_view_core_) 542 if (!content_view_core_)
543 return gfx::Size(); 543 return gfx::Size();
544 544
545 return content_view_core_->GetPhysicalBackingSize(); 545 return content_view_core_->GetPhysicalBackingSize();
546 } 546 }
547 547
548 float RenderWidgetHostViewAndroid::GetTopControlsLayoutHeight() const { 548 bool RenderWidgetHostViewAndroid::GetTopControlsShrinkBlinkSize() const {
549 if (!content_view_core_) 549 if (!content_view_core_)
550 return 0.f; 550 return 0.f;
bokan 2014/11/20 15:09:32 This should be a bool right?
David Trainor- moved to gerrit 2014/11/20 20:57:27 Done.
551 551
552 // The amount that the viewport size given to Blink is shrunk by the URL-bar. 552 // Whether or not Blink's viewport size should be shrunk by the height of the
553 return content_view_core_->GetTopControlsLayoutHeightDip(); 553 // URL-bar.
554 return content_view_core_->GetTopControlsShrinkBlinkSize();
555 }
556
557 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const {
558 if (!content_view_core_)
559 return 0.f;
560
561 // The height of the top controls.
562 return content_view_core_->GetTopControlsHeightDip();
554 } 563 }
555 564
556 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { 565 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
557 // There are no cursors on Android. 566 // There are no cursors on Android.
558 } 567 }
559 568
560 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { 569 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) {
561 // Do nothing. The UI notification is handled through ContentViewClient which 570 // Do nothing. The UI notification is handled through ContentViewClient which
562 // is TabContentsDelegate. 571 // is TabContentsDelegate.
563 } 572 }
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 results->orientationAngle = display.RotationAsDegree(); 1757 results->orientationAngle = display.RotationAsDegree();
1749 results->orientationType = 1758 results->orientationType =
1750 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1759 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1751 gfx::DeviceDisplayInfo info; 1760 gfx::DeviceDisplayInfo info;
1752 results->depth = info.GetBitsPerPixel(); 1761 results->depth = info.GetBitsPerPixel();
1753 results->depthPerComponent = info.GetBitsPerComponent(); 1762 results->depthPerComponent = info.GetBitsPerComponent();
1754 results->isMonochrome = (results->depthPerComponent == 0); 1763 results->isMonochrome = (results->depthPerComponent == 0);
1755 } 1764 }
1756 1765
1757 } // namespace content 1766 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698