| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "cc/resources/returned_resource.h" | 18 #include "cc/resources/returned_resource.h" |
| 19 #include "cc/surfaces/surface_factory_client.h" | 19 #include "cc/surfaces/surface_factory_client.h" |
| 20 #include "cc/surfaces/surface_id_allocator.h" | 20 #include "cc/surfaces/surface_id_allocator.h" |
| 21 #include "content/browser/compositor/image_transport_factory.h" | 21 #include "content/browser/compositor/image_transport_factory.h" |
| 22 #include "content/browser/renderer_host/event_with_latency_info.h" |
| 22 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 23 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 23 #include "content/common/content_export.h" | 24 #include "content/common/content_export.h" |
| 25 #include "content/common/input/input_event_ack_state.h" |
| 24 #include "content/public/browser/readback_types.h" | 26 #include "content/public/browser/readback_types.h" |
| 25 #include "ui/compositor/compositor.h" | 27 #include "ui/compositor/compositor.h" |
| 26 #include "ui/gfx/geometry/rect.h" | 28 #include "ui/gfx/geometry/rect.h" |
| 27 #include "ui/gfx/native_widget_types.h" | 29 #include "ui/gfx/native_widget_types.h" |
| 28 | 30 |
| 29 namespace cc { | 31 namespace cc { |
| 30 class SurfaceFactory; | 32 class SurfaceFactory; |
| 31 enum class SurfaceDrawStatus; | 33 enum class SurfaceDrawStatus; |
| 32 } | 34 } |
| 33 | 35 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 bool CanCopyToVideoFrame() const override; | 124 bool CanCopyToVideoFrame() const override; |
| 123 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; | 125 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; |
| 124 void OnSwapCompositorFrame(uint32_t output_surface_id, | 126 void OnSwapCompositorFrame(uint32_t output_surface_id, |
| 125 scoped_ptr<cc::CompositorFrame> frame) override; | 127 scoped_ptr<cc::CompositorFrame> frame) override; |
| 126 // Since the URL of content rendered by this class is not displayed in | 128 // Since the URL of content rendered by this class is not displayed in |
| 127 // the URL bar, this method does not need an implementation. | 129 // the URL bar, this method does not need an implementation. |
| 128 void ClearCompositorFrame() override {} | 130 void ClearCompositorFrame() override {} |
| 129 void GetScreenInfo(blink::WebScreenInfo* results) override; | 131 void GetScreenInfo(blink::WebScreenInfo* results) override; |
| 130 bool GetScreenColorProfile(std::vector<char>* color_profile) override; | 132 bool GetScreenColorProfile(std::vector<char>* color_profile) override; |
| 131 gfx::Rect GetBoundsInRootWindow() override; | 133 gfx::Rect GetBoundsInRootWindow() override; |
| 132 #if defined(USE_AURA) | |
| 133 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 134 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
| 134 InputEventAckState ack_result) override; | 135 InputEventAckState ack_result) override; |
| 135 #endif // defined(USE_AURA) | |
| 136 bool LockMouse() override; | 136 bool LockMouse() override; |
| 137 void UnlockMouse() override; | 137 void UnlockMouse() override; |
| 138 uint32_t GetSurfaceIdNamespace() override; | 138 uint32_t GetSurfaceIdNamespace() override; |
| 139 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; | 139 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; |
| 140 void ProcessMouseEvent(const blink::WebMouseEvent& event) override; | 140 void ProcessMouseEvent(const blink::WebMouseEvent& event) override; |
| 141 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event) override; | 141 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event) override; |
| 142 void ProcessTouchEvent(const blink::WebTouchEvent& event, |
| 143 const ui::LatencyInfo& latency) override; |
| 142 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override; | 144 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override; |
| 143 | 145 |
| 144 #if defined(OS_MACOSX) | 146 #if defined(OS_MACOSX) |
| 145 // RenderWidgetHostView implementation. | 147 // RenderWidgetHostView implementation. |
| 146 void SetActive(bool active) override; | 148 void SetActive(bool active) override; |
| 147 void SetWindowVisibility(bool visible) override; | 149 void SetWindowVisibility(bool visible) override; |
| 148 void WindowFrameChanged() override; | 150 void WindowFrameChanged() override; |
| 149 void ShowDefinitionForSelection() override; | 151 void ShowDefinitionForSelection() override; |
| 150 bool SupportsSpeech() const override; | 152 bool SupportsSpeech() const override; |
| 151 void SpeakSelection() override; | 153 void SpeakSelection() override; |
| 152 bool IsSpeaking() const override; | 154 bool IsSpeaking() const override; |
| 153 void StopSpeaking() override; | 155 void StopSpeaking() override; |
| 154 | 156 |
| 155 // RenderWidgetHostViewBase implementation. | 157 // RenderWidgetHostViewBase implementation. |
| 156 bool PostProcessEventForPluginIme( | 158 bool PostProcessEventForPluginIme( |
| 157 const NativeWebKeyboardEvent& event) override; | 159 const NativeWebKeyboardEvent& event) override; |
| 158 #endif // defined(OS_MACOSX) | 160 #endif // defined(OS_MACOSX) |
| 159 | 161 |
| 160 // RenderWidgetHostViewBase implementation. | 162 // RenderWidgetHostViewBase implementation. |
| 161 void LockCompositingSurface() override; | 163 void LockCompositingSurface() override; |
| 162 void UnlockCompositingSurface() override; | 164 void UnlockCompositingSurface() override; |
| 163 | 165 |
| 166 void RegisterSurfaceNamespaceId() override; |
| 167 void UnregisterSurfaceNamespaceId() override; |
| 168 |
| 164 #if defined(OS_WIN) | 169 #if defined(OS_WIN) |
| 165 void SetParentNativeViewAccessible( | 170 void SetParentNativeViewAccessible( |
| 166 gfx::NativeViewAccessible accessible_parent) override; | 171 gfx::NativeViewAccessible accessible_parent) override; |
| 167 gfx::NativeViewId GetParentForWindowlessPlugin() const override; | 172 gfx::NativeViewId GetParentForWindowlessPlugin() const override; |
| 168 #endif | 173 #endif |
| 169 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( | 174 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
| 170 BrowserAccessibilityDelegate* delegate) override; | 175 BrowserAccessibilityDelegate* delegate) override; |
| 171 | 176 |
| 172 // cc::SurfaceFactoryClient implementation. | 177 // cc::SurfaceFactoryClient implementation. |
| 173 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 178 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // it convenient to swap() when processing the list. | 230 // it convenient to swap() when processing the list. |
| 226 FrameSwappedCallbackList frame_swapped_callbacks_; | 231 FrameSwappedCallbackList frame_swapped_callbacks_; |
| 227 | 232 |
| 228 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 233 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 229 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 234 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 230 }; | 235 }; |
| 231 | 236 |
| 232 } // namespace content | 237 } // namespace content |
| 233 | 238 |
| 234 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 239 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |