| 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 "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( | 715 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( |
| 716 const cc::CompositorFrameMetadata& frame_metadata) { | 716 const cc::CompositorFrameMetadata& frame_metadata) { |
| 717 // This is a subset of OnSwapCompositorFrame() used in the synchronous | 717 // This is a subset of OnSwapCompositorFrame() used in the synchronous |
| 718 // compositor flow. | 718 // compositor flow. |
| 719 UpdateContentViewCoreFrameMetadata(frame_metadata); | 719 UpdateContentViewCoreFrameMetadata(frame_metadata); |
| 720 ComputeContentsSize(frame_metadata); | 720 ComputeContentsSize(frame_metadata); |
| 721 } | 721 } |
| 722 | 722 |
| 723 void RenderWidgetHostViewAndroid::UpdateContentViewCoreFrameMetadata( | 723 void RenderWidgetHostViewAndroid::UpdateContentViewCoreFrameMetadata( |
| 724 const cc::CompositorFrameMetadata& frame_metadata) { | 724 const cc::CompositorFrameMetadata& frame_metadata) { |
| 725 RenderWidgetHostViewBase::UpdateCompositorFrameMetadata(frame_metadata); |
| 725 if (content_view_core_) { | 726 if (content_view_core_) { |
| 726 // All offsets and sizes are in CSS pixels. | 727 // All offsets and sizes are in CSS pixels. |
| 727 content_view_core_->UpdateFrameInfo( | 728 content_view_core_->UpdateFrameInfo( |
| 728 frame_metadata.root_scroll_offset, | 729 frame_metadata.root_scroll_offset, |
| 729 frame_metadata.page_scale_factor, | 730 frame_metadata.page_scale_factor, |
| 730 gfx::Vector2dF(frame_metadata.min_page_scale_factor, | 731 gfx::Vector2dF(frame_metadata.min_page_scale_factor, |
| 731 frame_metadata.max_page_scale_factor), | 732 frame_metadata.max_page_scale_factor), |
| 732 frame_metadata.root_layer_size, | 733 frame_metadata.root_layer_size, |
| 733 frame_metadata.viewport_size, | 734 frame_metadata.viewport_size, |
| 734 frame_metadata.location_bar_offset, | 735 frame_metadata.location_bar_offset, |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 // RenderWidgetHostView, public: | 1288 // RenderWidgetHostView, public: |
| 1288 | 1289 |
| 1289 // static | 1290 // static |
| 1290 RenderWidgetHostView* | 1291 RenderWidgetHostView* |
| 1291 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1292 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1292 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1293 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1293 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1294 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1294 } | 1295 } |
| 1295 | 1296 |
| 1296 } // namespace content | 1297 } // namespace content |
| OLD | NEW |