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 <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 static scoped_refptr<cc::SurfaceLayer> CreateSurfaceLayer( |
|
danakj
2016/07/01 23:39:40
doesnt need to be part of the class either then i
no sievers
2016/07/01 23:48:31
Done.
| |
| 241 const cc::SurfaceId& surface_id, | |
| 242 const gfx::Size& size); | |
| 240 | 243 |
| 241 bool HasValidFrame() const; | 244 bool HasValidFrame() const; |
| 242 | 245 |
| 243 void MoveCaret(const gfx::Point& point); | 246 void MoveCaret(const gfx::Point& point); |
| 244 void DismissTextHandles(); | 247 void DismissTextHandles(); |
| 245 void SetTextHandlesTemporarilyHidden(bool hidden); | 248 void SetTextHandlesTemporarilyHidden(bool hidden); |
| 246 void OnShowingPastePopup(const gfx::PointF& point); | 249 void OnShowingPastePopup(const gfx::PointF& point); |
| 247 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 250 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
| 248 | 251 |
| 249 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); | 252 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); |
| 250 | 253 |
| 251 void SetOverlayVideoMode(bool enabled); | 254 void SetOverlayVideoMode(bool enabled); |
| 252 | 255 |
| 253 typedef base::Callback< | 256 typedef base::Callback< |
| 254 void(const base::string16& content, int start_offset, int end_offset)> | 257 void(const base::string16& content, int start_offset, int end_offset)> |
| 255 TextSurroundingSelectionCallback; | 258 TextSurroundingSelectionCallback; |
| 256 void SetTextSurroundingSelectionCallback( | 259 void SetTextSurroundingSelectionCallback( |
| 257 const TextSurroundingSelectionCallback& callback); | 260 const TextSurroundingSelectionCallback& callback); |
| 258 | 261 |
| 259 static void OnContextLost(); | 262 static void OnContextLost(); |
| 260 | 263 |
| 261 private: | 264 private: |
| 262 void RunAckCallbacks(cc::SurfaceDrawStatus status); | 265 void RunAckCallbacks(cc::SurfaceDrawStatus status); |
| 263 | 266 |
| 264 void DestroyDelegatedContent(); | 267 void DestroyDelegatedContent(); |
| 265 void CheckOutputSurfaceChanged(uint32_t output_surface_id); | 268 void CheckOutputSurfaceChanged(uint32_t output_surface_id); |
| 266 void SubmitCompositorFrame(cc::CompositorFrame frame_data); | 269 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); | 270 void SendDelegatedFrameAck(uint32_t output_surface_id); |
| 270 void SendReturnedDelegatedResources(uint32_t output_surface_id); | 271 void SendReturnedDelegatedResources(uint32_t output_surface_id); |
| 271 | 272 |
| 272 void OnFrameMetadataUpdated( | 273 void OnFrameMetadataUpdated( |
| 273 const cc::CompositorFrameMetadata& frame_metadata); | 274 const cc::CompositorFrameMetadata& frame_metadata); |
| 274 | 275 |
| 275 void ShowInternal(); | 276 void ShowInternal(); |
| 276 void HideInternal(); | 277 void HideInternal(); |
| 277 void AttachLayers(); | 278 void AttachLayers(); |
| 278 void RemoveLayers(); | 279 void RemoveLayers(); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 403 gfx::Vector2dF last_scroll_offset_; | 404 gfx::Vector2dF last_scroll_offset_; |
| 404 | 405 |
| 405 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 406 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
| 406 | 407 |
| 407 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 408 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
| 408 }; | 409 }; |
| 409 | 410 |
| 410 } // namespace content | 411 } // namespace content |
| 411 | 412 |
| 412 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
| OLD | NEW |