| 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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void UnregisterVideoHoleFrame(RenderFrameImpl* frame); | 159 void UnregisterVideoHoleFrame(RenderFrameImpl* frame); |
| 160 #endif // defined(VIDEO_HOLE) | 160 #endif // defined(VIDEO_HOLE) |
| 161 | 161 |
| 162 // IPC::Listener | 162 // IPC::Listener |
| 163 bool OnMessageReceived(const IPC::Message& msg) override; | 163 bool OnMessageReceived(const IPC::Message& msg) override; |
| 164 | 164 |
| 165 // IPC::Sender | 165 // IPC::Sender |
| 166 bool Send(IPC::Message* msg) override; | 166 bool Send(IPC::Message* msg) override; |
| 167 | 167 |
| 168 // blink::WebWidgetClient | 168 // blink::WebWidgetClient |
| 169 virtual void willBeginCompositorFrame(); | |
| 170 virtual void didAutoResize(const blink::WebSize& new_size); | 169 virtual void didAutoResize(const blink::WebSize& new_size); |
| 171 virtual void initializeLayerTreeView(); | 170 virtual void initializeLayerTreeView(); |
| 172 virtual blink::WebLayerTreeView* layerTreeView(); | 171 virtual blink::WebLayerTreeView* layerTreeView(); |
| 173 virtual void didBecomeReadyForAdditionalInput(); | |
| 174 virtual void didCommitAndDrawCompositorFrame(); | |
| 175 virtual void didCompleteSwapBuffers(); | |
| 176 virtual void scheduleComposite(); | |
| 177 virtual void didFocus(); | 172 virtual void didFocus(); |
| 178 virtual void didBlur(); | 173 virtual void didBlur(); |
| 179 virtual void didChangeCursor(const blink::WebCursorInfo&); | 174 virtual void didChangeCursor(const blink::WebCursorInfo&); |
| 180 virtual void closeWidgetSoon(); | 175 virtual void closeWidgetSoon(); |
| 181 virtual void show(blink::WebNavigationPolicy); | 176 virtual void show(blink::WebNavigationPolicy); |
| 182 virtual blink::WebRect windowRect(); | 177 virtual blink::WebRect windowRect(); |
| 183 virtual void setToolTipText(const blink::WebString& text, | 178 virtual void setToolTipText(const blink::WebString& text, |
| 184 blink::WebTextDirection hint); | 179 blink::WebTextDirection hint); |
| 185 virtual void setWindowRect(const blink::WebRect&); | 180 virtual void setWindowRect(const blink::WebRect&); |
| 186 virtual blink::WebRect windowResizerRect(); | 181 virtual blink::WebRect windowResizerRect(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 230 |
| 236 // Send a synthetic gesture to the browser to be queued to the synthetic | 231 // Send a synthetic gesture to the browser to be queued to the synthetic |
| 237 // gesture controller. | 232 // gesture controller. |
| 238 void QueueSyntheticGesture( | 233 void QueueSyntheticGesture( |
| 239 scoped_ptr<SyntheticGestureParams> gesture_params, | 234 scoped_ptr<SyntheticGestureParams> gesture_params, |
| 240 const SyntheticGestureCompletionCallback& callback); | 235 const SyntheticGestureCompletionCallback& callback); |
| 241 | 236 |
| 242 // Close the underlying WebWidget. | 237 // Close the underlying WebWidget. |
| 243 virtual void Close(); | 238 virtual void Close(); |
| 244 | 239 |
| 245 // Notifies about a compositor frame commit operation having finished. | |
| 246 virtual void DidCommitCompositorFrame(); | |
| 247 | |
| 248 // Deliveres |message| together with compositor state change updates. The | 240 // Deliveres |message| together with compositor state change updates. The |
| 249 // exact behavior depends on |policy|. | 241 // exact behavior depends on |policy|. |
| 250 // This mechanism is not a drop-in replacement for IPC: messages sent this way | 242 // This mechanism is not a drop-in replacement for IPC: messages sent this way |
| 251 // will not be automatically available to BrowserMessageFilter, for example. | 243 // will not be automatically available to BrowserMessageFilter, for example. |
| 252 // FIFO ordering is preserved between messages enqueued with the same | 244 // FIFO ordering is preserved between messages enqueued with the same |
| 253 // |policy|, the ordering between messages enqueued for different policies is | 245 // |policy|, the ordering between messages enqueued for different policies is |
| 254 // undefined. | 246 // undefined. |
| 255 // | 247 // |
| 256 // |msg| message to send, ownership of |msg| is transferred. | 248 // |msg| message to send, ownership of |msg| is transferred. |
| 257 // |policy| see the comment on MessageDeliveryPolicy. | 249 // |policy| see the comment on MessageDeliveryPolicy. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 278 | 270 |
| 279 // ScreenMetricsEmulator class manages screen emulation inside a render | 271 // ScreenMetricsEmulator class manages screen emulation inside a render |
| 280 // widget. This includes resizing, placing view on the screen at desired | 272 // widget. This includes resizing, placing view on the screen at desired |
| 281 // position, changing device scale factor, and scaling down the whole | 273 // position, changing device scale factor, and scaling down the whole |
| 282 // widget if required to fit into the browser window. | 274 // widget if required to fit into the browser window. |
| 283 class ScreenMetricsEmulator; | 275 class ScreenMetricsEmulator; |
| 284 | 276 |
| 285 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator); | 277 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator); |
| 286 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor); | 278 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor); |
| 287 | 279 |
| 280 // Indicates that the compositor is about to begin a frame. This is primarily |
| 281 // to signal to flow control mechanisms that a frame is beginning, not to |
| 282 // perform actual painting work. |
| 283 void WillBeginCompositorFrame(); |
| 284 |
| 285 // Notifies about a compositor frame commit operation having finished. |
| 286 virtual void DidCommitCompositorFrame(); |
| 287 |
| 288 // Notifies that the draw commands for a committed frame have been issued. |
| 289 void DidCommitAndDrawCompositorFrame(); |
| 290 |
| 291 // Notifies that the compositor has posted a swapbuffers operation to the GPU |
| 292 // process. |
| 293 void DidCompleteSwapBuffers(); |
| 294 |
| 295 void ScheduleComposite(); |
| 288 void ScheduleCompositeWithForcedRedraw(); | 296 void ScheduleCompositeWithForcedRedraw(); |
| 289 | 297 |
| 290 // Called by the compositor in single-threaded mode when a swap is posted, | 298 // Called by the compositor in single-threaded mode when a swap is posted, |
| 291 // completes or is aborted. | 299 // completes or is aborted. |
| 292 void OnSwapBuffersPosted(); | 300 void OnSwapBuffersPosted(); |
| 293 void OnSwapBuffersComplete(); | 301 void OnSwapBuffersComplete(); |
| 294 void OnSwapBuffersAborted(); | 302 void OnSwapBuffersAborted(); |
| 295 | 303 |
| 296 // Checks if the text input state and compose inline mode have been changed. | 304 // Checks if the text input state and compose inline mode have been changed. |
| 297 // If they are changed, the new value will be sent to the browser process. | 305 // If they are changed, the new value will be sent to the browser process. |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 ui::MenuSourceType context_menu_source_type_; | 822 ui::MenuSourceType context_menu_source_type_; |
| 815 bool has_host_context_menu_location_; | 823 bool has_host_context_menu_location_; |
| 816 gfx::Point host_context_menu_location_; | 824 gfx::Point host_context_menu_location_; |
| 817 | 825 |
| 818 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 826 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 819 }; | 827 }; |
| 820 | 828 |
| 821 } // namespace content | 829 } // namespace content |
| 822 | 830 |
| 823 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 831 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |