Chromium Code Reviews| 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 #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 <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/process.h" | 14 #include "base/process.h" |
| 14 #include "content/browser/renderer_host/ime_adapter_android.h" | 15 #include "content/browser/renderer_host/ime_adapter_android.h" |
| 15 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 16 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 17 #include "gpu/command_buffer/common/mailbox.h" | |
| 16 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
| 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" |
| 18 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
| 19 #include "ui/gfx/vector2d_f.h" | 21 #include "ui/gfx/vector2d_f.h" |
| 20 | 22 |
| 21 struct ViewHostMsg_TextInputState_Params; | 23 struct ViewHostMsg_TextInputState_Params; |
| 22 | 24 |
| 23 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 25 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 24 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 26 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
| 25 | 27 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 virtual void SetScrollOffsetPinning( | 132 virtual void SetScrollOffsetPinning( |
| 131 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 133 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
| 132 virtual void UnhandledWheelEvent( | 134 virtual void UnhandledWheelEvent( |
| 133 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | 135 const WebKit::WebMouseWheelEvent& event) OVERRIDE; |
| 134 virtual void OnAccessibilityNotifications( | 136 virtual void OnAccessibilityNotifications( |
| 135 const std::vector<AccessibilityHostMsg_NotificationParams>& | 137 const std::vector<AccessibilityHostMsg_NotificationParams>& |
| 136 params) OVERRIDE; | 138 params) OVERRIDE; |
| 137 virtual bool LockMouse() OVERRIDE; | 139 virtual bool LockMouse() OVERRIDE; |
| 138 virtual void UnlockMouse() OVERRIDE; | 140 virtual void UnlockMouse() OVERRIDE; |
| 139 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE; | 141 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE; |
| 142 virtual void OnSwapCompositorFrame(const cc::CompositorFrame& frame) OVERRIDE; | |
| 140 virtual void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, | 143 virtual void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, |
| 141 float page_scale_factor, | 144 float page_scale_factor, |
| 142 const gfx::Vector2dF& page_scale_factor_limits, | 145 const gfx::Vector2dF& page_scale_factor_limits, |
| 143 const gfx::SizeF& content_size, | 146 const gfx::SizeF& content_size, |
| 144 const gfx::SizeF& viewport_size, | 147 const gfx::SizeF& viewport_size, |
| 145 const gfx::Vector2dF& controls_offset, | 148 const gfx::Vector2dF& controls_offset, |
| 146 const gfx::Vector2dF& content_offset) OVERRIDE; | 149 const gfx::Vector2dF& content_offset) OVERRIDE; |
| 147 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, | 150 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, |
| 148 const SkBitmap& zoomed_bitmap) OVERRIDE; | 151 const SkBitmap& zoomed_bitmap) OVERRIDE; |
| 149 | 152 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 166 bool PopulateBitmapWithContents(jobject jbitmap); | 169 bool PopulateBitmapWithContents(jobject jbitmap); |
| 167 | 170 |
| 168 bool HasValidFrame() const; | 171 bool HasValidFrame() const; |
| 169 | 172 |
| 170 // Select all text between the given coordinates. | 173 // Select all text between the given coordinates. |
| 171 void SelectRange(const gfx::Point& start, const gfx::Point& end); | 174 void SelectRange(const gfx::Point& start, const gfx::Point& end); |
| 172 | 175 |
| 173 void MoveCaret(const gfx::Point& point); | 176 void MoveCaret(const gfx::Point& point); |
| 174 | 177 |
| 175 private: | 178 private: |
| 179 void BuffersSwapped(const gpu::Mailbox& mailbox, | |
| 180 const gfx::Size& size, | |
|
Sami
2013/03/05 17:44:42
Nit: pass size by value.
no sievers
2013/03/05 21:58:05
Done.
| |
| 181 const base::Closure& ack_callback); | |
| 182 | |
| 176 // The model object. | 183 // The model object. |
| 177 RenderWidgetHostImpl* host_; | 184 RenderWidgetHostImpl* host_; |
| 178 | 185 |
| 179 // Whether or not this widget is potentially attached to the view hierarchy. | 186 // Whether or not this widget is potentially attached to the view hierarchy. |
| 180 // This view may not actually be attached if this is true, but it should be | 187 // This view may not actually be attached if this is true, but it should be |
| 181 // treated as such, because as soon as a ContentViewCore is set the layer | 188 // treated as such, because as soon as a ContentViewCore is set the layer |
| 182 // will be attached automatically. | 189 // will be attached automatically. |
| 183 bool is_layer_attached_; | 190 bool is_layer_attached_; |
| 184 | 191 |
| 185 // ContentViewCoreImpl is our interface to the view system. | 192 // ContentViewCoreImpl is our interface to the view system. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 200 | 207 |
| 201 // The most recent texture id that was pushed to the texture layer. | 208 // The most recent texture id that was pushed to the texture layer. |
| 202 unsigned int texture_id_in_layer_; | 209 unsigned int texture_id_in_layer_; |
| 203 | 210 |
| 204 // The most recent texture size that was pushed to the texture layer. | 211 // The most recent texture size that was pushed to the texture layer. |
| 205 gfx::Size texture_size_in_layer_; | 212 gfx::Size texture_size_in_layer_; |
| 206 | 213 |
| 207 // Used for image transport when needing to share resources across threads. | 214 // Used for image transport when needing to share resources across threads. |
| 208 scoped_ptr<SurfaceTextureTransportClient> surface_texture_transport_; | 215 scoped_ptr<SurfaceTextureTransportClient> surface_texture_transport_; |
| 209 | 216 |
| 210 // The mailbox name of the previously received frame. | 217 // The mailbox of the previously received frame. |
| 211 std::string current_mailbox_name_; | 218 gpu::Mailbox current_mailbox_; |
| 212 | 219 |
| 213 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 220 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 214 }; | 221 }; |
| 215 | 222 |
| 216 } // namespace content | 223 } // namespace content |
| 217 | 224 |
| 218 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 225 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |