| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |