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

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: Rebase 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
« no previous file with comments | « no previous file | ui/android/delegated_frame_host_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 RenderWidgetHostView* reference_host_view) { 372 RenderWidgetHostView* reference_host_view) {
373 NOTIMPLEMENTED(); 373 NOTIMPLEMENTED();
374 } 374 }
375 375
376 RenderWidgetHost* 376 RenderWidgetHost*
377 RenderWidgetHostViewAndroid::GetRenderWidgetHost() const { 377 RenderWidgetHostViewAndroid::GetRenderWidgetHost() const {
378 return host_; 378 return host_;
379 } 379 }
380 380
381 void RenderWidgetHostViewAndroid::WasResized() { 381 void RenderWidgetHostViewAndroid::WasResized() {
382 if (delegated_frame_host_) 382 if (delegated_frame_host_ && content_view_core_)
383 delegated_frame_host_->UpdateContainerSizeinDIP(GetVisibleViewportSize()); 383 delegated_frame_host_->UpdateContainerSizeinDIP(
384 content_view_core_->GetViewportSizeDip());
384 host_->WasResized(); 385 host_->WasResized();
385 } 386 }
386 387
387 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { 388 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) {
388 // Ignore the given size as only the Java code has the power to 389 // Ignore the given size as only the Java code has the power to
389 // resize the view on Android. 390 // resize the view on Android.
390 default_size_ = size; 391 default_size_ = size;
391 } 392 }
392 393
393 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) { 394 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) {
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 case ui::MotionEvent::ACTION_UP: 1858 case ui::MotionEvent::ACTION_UP:
1858 case ui::MotionEvent::ACTION_POINTER_UP: 1859 case ui::MotionEvent::ACTION_POINTER_UP:
1859 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1860 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1860 delta.InMicroseconds(), 1, 1000000, 50); 1861 delta.InMicroseconds(), 1, 1000000, 50);
1861 default: 1862 default:
1862 return; 1863 return;
1863 } 1864 }
1864 } 1865 }
1865 1866
1866 } // namespace content 1867 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/android/delegated_frame_host_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698