| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <queue> | 13 #include <queue> |
| 14 | 14 |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 17 #include "base/i18n/rtl.h" | 17 #include "base/i18n/rtl.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/process/process.h" | 20 #include "base/process/process.h" |
| 21 #include "cc/input/selection.h" | 21 #include "cc/input/selection.h" |
| 22 #include "cc/layers/surface_layer.h" |
| 22 #include "cc/output/begin_frame_args.h" | 23 #include "cc/output/begin_frame_args.h" |
| 23 #include "cc/surfaces/surface_factory_client.h" | 24 #include "cc/surfaces/surface_factory_client.h" |
| 24 #include "cc/surfaces/surface_id.h" | 25 #include "cc/surfaces/surface_id.h" |
| 25 #include "content/browser/accessibility/browser_accessibility_manager.h" | 26 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 26 #include "content/browser/android/content_view_core_impl_observer.h" | 27 #include "content/browser/android/content_view_core_impl_observer.h" |
| 27 #include "content/browser/renderer_host/delegated_frame_evictor.h" | 28 #include "content/browser/renderer_host/delegated_frame_evictor.h" |
| 28 #include "content/browser/renderer_host/ime_adapter_android.h" | 29 #include "content/browser/renderer_host/ime_adapter_android.h" |
| 29 #include "content/browser/renderer_host/input/stylus_text_selector.h" | 30 #include "content/browser/renderer_host/input/stylus_text_selector.h" |
| 30 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 31 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 31 #include "content/common/content_export.h" | 32 #include "content/common/content_export.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 230 |
| 230 long GetNativeImeAdapter(); | 231 long GetNativeImeAdapter(); |
| 231 | 232 |
| 232 void WasResized(); | 233 void WasResized(); |
| 233 | 234 |
| 234 void GetScaledContentBitmap(float scale, | 235 void GetScaledContentBitmap(float scale, |
| 235 SkColorType preferred_color_type, | 236 SkColorType preferred_color_type, |
| 236 gfx::Rect src_subrect, | 237 gfx::Rect src_subrect, |
| 237 const ReadbackRequestCallback& result_callback); | 238 const ReadbackRequestCallback& result_callback); |
| 238 | 239 |
| 239 scoped_refptr<cc::Layer> CreateDelegatedLayer() const; | |
| 240 | |
| 241 bool HasValidFrame() const; | 240 bool HasValidFrame() const; |
| 242 | 241 |
| 243 void MoveCaret(const gfx::Point& point); | 242 void MoveCaret(const gfx::Point& point); |
| 244 void DismissTextHandles(); | 243 void DismissTextHandles(); |
| 245 void SetTextHandlesTemporarilyHidden(bool hidden); | 244 void SetTextHandlesTemporarilyHidden(bool hidden); |
| 246 void OnShowingPastePopup(const gfx::PointF& point); | 245 void OnShowingPastePopup(const gfx::PointF& point); |
| 247 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 246 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
| 248 | 247 |
| 249 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); | 248 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); |
| 250 | 249 |
| 251 void SetOverlayVideoMode(bool enabled); | 250 void SetOverlayVideoMode(bool enabled); |
| 252 | 251 |
| 253 typedef base::Callback< | 252 typedef base::Callback< |
| 254 void(const base::string16& content, int start_offset, int end_offset)> | 253 void(const base::string16& content, int start_offset, int end_offset)> |
| 255 TextSurroundingSelectionCallback; | 254 TextSurroundingSelectionCallback; |
| 256 void SetTextSurroundingSelectionCallback( | 255 void SetTextSurroundingSelectionCallback( |
| 257 const TextSurroundingSelectionCallback& callback); | 256 const TextSurroundingSelectionCallback& callback); |
| 258 | 257 |
| 259 static void OnContextLost(); | 258 static void OnContextLost(); |
| 260 | 259 |
| 261 private: | 260 private: |
| 262 void RunAckCallbacks(cc::SurfaceDrawStatus status); | 261 void RunAckCallbacks(cc::SurfaceDrawStatus status); |
| 263 | 262 |
| 264 void DestroyDelegatedContent(); | 263 void DestroyDelegatedContent(); |
| 265 void CheckOutputSurfaceChanged(uint32_t output_surface_id); | 264 void CheckOutputSurfaceChanged(uint32_t output_surface_id); |
| 266 void SubmitCompositorFrame(cc::CompositorFrame frame_data); | 265 void SubmitCompositorFrame(cc::CompositorFrame frame_data); |
| 267 void SwapDelegatedFrame(uint32_t output_surface_id, | |
| 268 cc::CompositorFrame frame_data); | |
| 269 void SendDelegatedFrameAck(uint32_t output_surface_id); | 266 void SendDelegatedFrameAck(uint32_t output_surface_id); |
| 270 void SendReturnedDelegatedResources(uint32_t output_surface_id); | 267 void SendReturnedDelegatedResources(uint32_t output_surface_id); |
| 271 | 268 |
| 272 void OnFrameMetadataUpdated( | 269 void OnFrameMetadataUpdated( |
| 273 const cc::CompositorFrameMetadata& frame_metadata); | 270 const cc::CompositorFrameMetadata& frame_metadata); |
| 274 | 271 |
| 275 void ShowInternal(); | 272 void ShowInternal(); |
| 276 void HideInternal(); | 273 void HideInternal(); |
| 277 void AttachLayers(); | 274 void AttachLayers(); |
| 278 void RemoveLayers(); | 275 void RemoveLayers(); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 gfx::Vector2dF last_scroll_offset_; | 400 gfx::Vector2dF last_scroll_offset_; |
| 404 | 401 |
| 405 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 402 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 406 | 403 |
| 407 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 404 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 408 }; | 405 }; |
| 409 | 406 |
| 410 } // namespace content | 407 } // namespace content |
| 411 | 408 |
| 412 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 409 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |