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

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

Issue 2253313002: ui: Pass the correct container size to DelegatedFrameHostAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 RenderWidgetHostView* reference_host_view) { 373 RenderWidgetHostView* reference_host_view) {
374 NOTIMPLEMENTED(); 374 NOTIMPLEMENTED();
375 } 375 }
376 376
377 RenderWidgetHost* 377 RenderWidgetHost*
378 RenderWidgetHostViewAndroid::GetRenderWidgetHost() const { 378 RenderWidgetHostViewAndroid::GetRenderWidgetHost() const {
379 return host_; 379 return host_;
380 } 380 }
381 381
382 void RenderWidgetHostViewAndroid::WasResized() { 382 void RenderWidgetHostViewAndroid::WasResized() {
383 if (delegated_frame_host_) 383 if (delegated_frame_host_ && content_view_core_)
384 delegated_frame_host_->UpdateContainerSizeinDIP(GetVisibleViewportSize()); 384 delegated_frame_host_->UpdateContainerSizeinDIP(
385 content_view_core_->GetViewportSizeDip());
385 host_->WasResized(); 386 host_->WasResized();
386 } 387 }
387 388
388 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { 389 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) {
389 // Ignore the given size as only the Java code has the power to 390 // Ignore the given size as only the Java code has the power to
390 // resize the view on Android. 391 // resize the view on Android.
391 default_size_ = size; 392 default_size_ = size;
392 } 393 }
393 394
394 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) { 395 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) {
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 case ui::MotionEvent::ACTION_UP: 1850 case ui::MotionEvent::ACTION_UP:
1850 case ui::MotionEvent::ACTION_POINTER_UP: 1851 case ui::MotionEvent::ACTION_POINTER_UP:
1851 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1852 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1852 delta.InMicroseconds(), 1, 1000000, 50); 1853 delta.InMicroseconds(), 1, 1000000, 50);
1853 default: 1854 default:
1854 return; 1855 return;
1855 } 1856 }
1856 } 1857 }
1857 1858
1858 } // namespace content 1859 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/android/delegated_frame_host_android.cc » ('j') | ui/android/delegated_frame_host_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698