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