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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 | 1084 |
1085 void RenderWidgetHostViewAndroid::DidCommitFrameData() { | 1085 void RenderWidgetHostViewAndroid::DidCommitFrameData() { |
1086 RunAckCallbacks(); | 1086 RunAckCallbacks(); |
1087 } | 1087 } |
1088 | 1088 |
1089 WebKit::WebGraphicsContext3D* RenderWidgetHostViewAndroid::Context3d() { | 1089 WebKit::WebGraphicsContext3D* RenderWidgetHostViewAndroid::Context3d() { |
1090 return ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); | 1090 return ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); |
1091 } | 1091 } |
1092 | 1092 |
1093 bool RenderWidgetHostViewAndroid::PrepareTextureMailbox( | 1093 bool RenderWidgetHostViewAndroid::PrepareTextureMailbox( |
1094 cc::TextureMailbox* mailbox) { | 1094 cc::TextureMailbox* mailbox, |
| 1095 bool use_shared_memory) { |
1095 return false; | 1096 return false; |
1096 } | 1097 } |
1097 | 1098 |
1098 // static | 1099 // static |
1099 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 1100 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
1100 WebKit::WebScreenInfo* results) { | 1101 WebKit::WebScreenInfo* results) { |
1101 const gfx::Display& display = | 1102 const gfx::Display& display = |
1102 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); | 1103 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); |
1103 results->rect = display.bounds(); | 1104 results->rect = display.bounds(); |
1104 // TODO(husky): Remove any system controls from availableRect. | 1105 // TODO(husky): Remove any system controls from availableRect. |
1105 results->availableRect = display.work_area(); | 1106 results->availableRect = display.work_area(); |
1106 results->deviceScaleFactor = display.device_scale_factor(); | 1107 results->deviceScaleFactor = display.device_scale_factor(); |
1107 gfx::DeviceDisplayInfo info; | 1108 gfx::DeviceDisplayInfo info; |
1108 results->depth = info.GetBitsPerPixel(); | 1109 results->depth = info.GetBitsPerPixel(); |
1109 results->depthPerComponent = info.GetBitsPerComponent(); | 1110 results->depthPerComponent = info.GetBitsPerComponent(); |
1110 results->isMonochrome = (results->depthPerComponent == 0); | 1111 results->isMonochrome = (results->depthPerComponent == 0); |
1111 } | 1112 } |
1112 | 1113 |
1113 //////////////////////////////////////////////////////////////////////////////// | 1114 //////////////////////////////////////////////////////////////////////////////// |
1114 // RenderWidgetHostView, public: | 1115 // RenderWidgetHostView, public: |
1115 | 1116 |
1116 // static | 1117 // static |
1117 RenderWidgetHostView* | 1118 RenderWidgetHostView* |
1118 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1119 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1119 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1120 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1120 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1121 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1121 } | 1122 } |
1122 | 1123 |
1123 } // namespace content | 1124 } // namespace content |
OLD | NEW |