| 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 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; | 131 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; |
| 132 void ProcessMouseEvent(const blink::WebMouseEvent& event, | 132 void ProcessMouseEvent(const blink::WebMouseEvent& event, |
| 133 const ui::LatencyInfo& latency) override; | 133 const ui::LatencyInfo& latency) override; |
| 134 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event, | 134 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event, |
| 135 const ui::LatencyInfo& latency) override; | 135 const ui::LatencyInfo& latency) override; |
| 136 void ProcessTouchEvent(const blink::WebTouchEvent& event, | 136 void ProcessTouchEvent(const blink::WebTouchEvent& event, |
| 137 const ui::LatencyInfo& latency) override; | 137 const ui::LatencyInfo& latency) override; |
| 138 void ProcessGestureEvent(const blink::WebGestureEvent& event, | 138 void ProcessGestureEvent(const blink::WebGestureEvent& event, |
| 139 const ui::LatencyInfo& latency) override; | 139 const ui::LatencyInfo& latency) override; |
| 140 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override; | 140 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point) override; |
| 141 gfx::Point TransformPointToLocalCoordSpace( |
| 142 const gfx::Point& point, |
| 143 const cc::SurfaceId& original_surface) override; |
| 144 gfx::Point TransformPointToCoordSpaceForView( |
| 145 const gfx::Point& point, |
| 146 RenderWidgetHostViewBase* target_view) override; |
| 141 | 147 |
| 142 #if defined(OS_MACOSX) | 148 #if defined(OS_MACOSX) |
| 143 // RenderWidgetHostView implementation. | 149 // RenderWidgetHostView implementation. |
| 144 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; | 150 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; |
| 145 void SetActive(bool active) override; | 151 void SetActive(bool active) override; |
| 146 void ShowDefinitionForSelection() override; | 152 void ShowDefinitionForSelection() override; |
| 147 bool SupportsSpeech() const override; | 153 bool SupportsSpeech() const override; |
| 148 void SpeakSelection() override; | 154 void SpeakSelection() override; |
| 149 bool IsSpeaking() const override; | 155 bool IsSpeaking() const override; |
| 150 void StopSpeaking() override; | 156 void StopSpeaking() override; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 172 // to Bind() to it. | 178 // to Bind() to it. |
| 173 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); | 179 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); |
| 174 | 180 |
| 175 // Exposed for tests. | 181 // Exposed for tests. |
| 176 bool IsChildFrameForTesting() const override; | 182 bool IsChildFrameForTesting() const override; |
| 177 cc::SurfaceId SurfaceIdForTesting() const override; | 183 cc::SurfaceId SurfaceIdForTesting() const override; |
| 178 CrossProcessFrameConnector* FrameConnectorForTesting() const { | 184 CrossProcessFrameConnector* FrameConnectorForTesting() const { |
| 179 return frame_connector_; | 185 return frame_connector_; |
| 180 } | 186 } |
| 181 | 187 |
| 188 // Returns the view into which this view is directly embedded. This can |
| 189 // return nullptr when this view's associated child frame is not connected |
| 190 // to the frame tree. |
| 191 RenderWidgetHostViewBase* GetParentView(); |
| 192 |
| 182 void RegisterSurfaceNamespaceId(); | 193 void RegisterSurfaceNamespaceId(); |
| 183 void UnregisterSurfaceNamespaceId(); | 194 void UnregisterSurfaceNamespaceId(); |
| 184 | 195 |
| 185 protected: | 196 protected: |
| 186 friend class RenderWidgetHostView; | 197 friend class RenderWidgetHostView; |
| 187 friend class RenderWidgetHostViewChildFrameTest; | 198 friend class RenderWidgetHostViewChildFrameTest; |
| 188 friend class RenderWidgetHostViewGuestSurfaceTest; | 199 friend class RenderWidgetHostViewGuestSurfaceTest; |
| 189 | 200 |
| 190 // Clears current compositor surface, if one is in use. | 201 // Clears current compositor surface, if one is in use. |
| 191 void ClearCompositorSurfaceIfNecessary(); | 202 void ClearCompositorSurfaceIfNecessary(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // The surface client ID of the parent RenderWidgetHostView. 0 if none. | 248 // The surface client ID of the parent RenderWidgetHostView. 0 if none. |
| 238 uint32_t parent_surface_client_id_; | 249 uint32_t parent_surface_client_id_; |
| 239 | 250 |
| 240 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 251 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 241 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 252 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 242 }; | 253 }; |
| 243 | 254 |
| 244 } // namespace content | 255 } // namespace content |
| 245 | 256 |
| 246 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 257 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |