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

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

Issue 2106753004: Introduce bottom controls to CC and let it respond to scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 <utility> 9 #include <utility>
10 10
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 628 }
629 629
630 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { 630 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const {
631 if (!content_view_core_) 631 if (!content_view_core_)
632 return 0.f; 632 return 0.f;
633 633
634 // The height of the top controls. 634 // The height of the top controls.
635 return content_view_core_->GetTopControlsHeightDip(); 635 return content_view_core_->GetTopControlsHeightDip();
636 } 636 }
637 637
638 float RenderWidgetHostViewAndroid::GetBottomControlsHeight() const {
639 if (!content_view_core_)
640 return 0.f;
641
642 // The height of the top controls.
643 return content_view_core_->GetBottomControlsHeightDip();
644 }
645
638 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { 646 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
639 // There are no cursors on Android. 647 // There are no cursors on Android.
640 } 648 }
641 649
642 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { 650 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) {
643 // Do nothing. The UI notification is handled through ContentViewClient which 651 // Do nothing. The UI notification is handled through ContentViewClient which
644 // is TabContentsDelegate. 652 // is TabContentsDelegate.
645 } 653 }
646 654
647 long RenderWidgetHostViewAndroid::GetNativeImeAdapter() { 655 long RenderWidgetHostViewAndroid::GetNativeImeAdapter() {
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 // All offsets and sizes are in CSS pixels. 1305 // All offsets and sizes are in CSS pixels.
1298 content_view_core_->UpdateFrameInfo( 1306 content_view_core_->UpdateFrameInfo(
1299 frame_metadata.root_scroll_offset, 1307 frame_metadata.root_scroll_offset,
1300 frame_metadata.page_scale_factor, 1308 frame_metadata.page_scale_factor,
1301 gfx::Vector2dF(frame_metadata.min_page_scale_factor, 1309 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
1302 frame_metadata.max_page_scale_factor), 1310 frame_metadata.max_page_scale_factor),
1303 frame_metadata.root_layer_size, 1311 frame_metadata.root_layer_size,
1304 frame_metadata.scrollable_viewport_size, 1312 frame_metadata.scrollable_viewport_size,
1305 frame_metadata.location_bar_offset, 1313 frame_metadata.location_bar_offset,
1306 frame_metadata.location_bar_content_translation, 1314 frame_metadata.location_bar_content_translation,
1315 frame_metadata.bottom_bar_offset,
1316 frame_metadata.bottom_bar_content_translation,
1307 is_mobile_optimized, 1317 is_mobile_optimized,
1308 frame_metadata.selection.start); 1318 frame_metadata.selection.start);
1309 #if defined(VIDEO_HOLE) 1319 #if defined(VIDEO_HOLE)
1310 if (host_) { 1320 if (host_) {
1311 WebContents* web_contents = 1321 WebContents* web_contents =
1312 WebContents::FromRenderViewHost(RenderViewHostImpl::From(host_)); 1322 WebContents::FromRenderViewHost(RenderViewHostImpl::From(host_));
1313 if (web_contents) { 1323 if (web_contents) {
1314 MediaWebContentsObserverAndroid::FromWebContents(web_contents) 1324 MediaWebContentsObserverAndroid::FromWebContents(web_contents)
1315 ->OnFrameInfoUpdated(); 1325 ->OnFrameInfoUpdated();
1316 } 1326 }
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 case ui::MotionEvent::ACTION_UP: 2032 case ui::MotionEvent::ACTION_UP:
2023 case ui::MotionEvent::ACTION_POINTER_UP: 2033 case ui::MotionEvent::ACTION_POINTER_UP:
2024 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 2034 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
2025 delta.InMicroseconds(), 1, 1000000, 50); 2035 delta.InMicroseconds(), 1, 1000000, 50);
2026 default: 2036 default:
2027 return; 2037 return;
2028 } 2038 }
2029 } 2039 }
2030 2040
2031 } // namespace content 2041 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698