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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 11234008: Enable texture readback support for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 2 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/process.h" 11 #include "base/process.h"
12 #include "content/browser/renderer_host/ime_adapter_android.h" 12 #include "content/browser/renderer_host/ime_adapter_android.h"
13 #include "content/browser/renderer_host/render_widget_host_view_base.h" 13 #include "content/browser/renderer_host/render_widget_host_view_base.h"
14 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayer.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayer.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
16 #include "ui/gfx/size.h" 17 #include "ui/gfx/size.h"
17 18
18 struct ViewHostMsg_TextInputState_Params; 19 struct ViewHostMsg_TextInputState_Params;
19 20
20 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; 21 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
21 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; 22 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
22 23
23 namespace WebKit { 24 namespace WebKit {
24 class WebTouchEvent; 25 class WebTouchEvent;
25 class WebMouseEvent; 26 class WebMouseEvent;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 void SetContentViewCore(ContentViewCoreImpl* content_view_core); 128 void SetContentViewCore(ContentViewCoreImpl* content_view_core);
128 SkColor GetCachedBackgroundColor() const; 129 SkColor GetCachedBackgroundColor() const;
129 void SendKeyEvent(const NativeWebKeyboardEvent& event); 130 void SendKeyEvent(const NativeWebKeyboardEvent& event);
130 void SendTouchEvent(const WebKit::WebTouchEvent& event); 131 void SendTouchEvent(const WebKit::WebTouchEvent& event);
131 void SendMouseEvent(const WebKit::WebMouseEvent& event); 132 void SendMouseEvent(const WebKit::WebMouseEvent& event);
132 void SendMouseWheelEvent(const WebKit::WebMouseWheelEvent& event); 133 void SendMouseWheelEvent(const WebKit::WebMouseWheelEvent& event);
133 void SendGestureEvent(const WebKit::WebGestureEvent& event); 134 void SendGestureEvent(const WebKit::WebGestureEvent& event);
134 135
135 int GetNativeImeAdapter(); 136 int GetNativeImeAdapter();
136 137
138 WebKit::WebGLId GetScaledContentTexture(const gfx::Size& size);
139 bool PopulateBitmapWithContents(jobject jbitmap);
140
137 // Select all text between the given coordinates. 141 // Select all text between the given coordinates.
138 void SelectRange(const gfx::Point& start, const gfx::Point& end); 142 void SelectRange(const gfx::Point& start, const gfx::Point& end);
139 143
140 private: 144 private:
141 // The model object. 145 // The model object.
142 RenderWidgetHostImpl* host_; 146 RenderWidgetHostImpl* host_;
143 147
144 // Whether or not this widget is hidden. 148 // Whether or not this widget is hidden.
145 bool is_hidden_; 149 bool is_hidden_;
146 150
147 // ContentViewCoreImpl is our interface to the view system. 151 // ContentViewCoreImpl is our interface to the view system.
148 ContentViewCoreImpl* content_view_core_; 152 ContentViewCoreImpl* content_view_core_;
149 153
150 // The size that we want the renderer to be. We keep this in a separate 154 // The size that we want the renderer to be. We keep this in a separate
151 // variable because resizing is async. 155 // variable because resizing is async.
152 gfx::Size requested_size_; 156 gfx::Size requested_size_;
153 157
154 ImeAdapterAndroid ime_adapter_android_; 158 ImeAdapterAndroid ime_adapter_android_;
155 159
156 // Body background color of the underlying document. 160 // Body background color of the underlying document.
157 SkColor cached_background_color_; 161 SkColor cached_background_color_;
158 162
159 // The texture layer for this view when using browser-side compositing. 163 // The texture layer for this view when using browser-side compositing.
160 scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_; 164 scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_;
161 165
166 // The most recent texture id that was pushed to the texture layer.
167 unsigned int texture_id_in_layer_;
168
162 // The handle for the transport surface (between renderer and browser-side 169 // The handle for the transport surface (between renderer and browser-side
163 // compositor) for this view. 170 // compositor) for this view.
164 gfx::GLSurfaceHandle shared_surface_; 171 gfx::GLSurfaceHandle shared_surface_;
165 172
166 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 173 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
167 }; 174 };
168 175
169 } // namespace content 176 } // namespace content
170 177
171 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 178 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698