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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE; | 157 virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE; |
158 virtual RenderProcessHost* GetProcess() const OVERRIDE; | 158 virtual RenderProcessHost* GetProcess() const OVERRIDE; |
159 virtual int GetRoutingID() const OVERRIDE; | 159 virtual int GetRoutingID() const OVERRIDE; |
160 virtual RenderWidgetHostView* GetView() const OVERRIDE; | 160 virtual RenderWidgetHostView* GetView() const OVERRIDE; |
161 virtual bool IsLoading() const OVERRIDE; | 161 virtual bool IsLoading() const OVERRIDE; |
162 virtual bool IsRenderView() const OVERRIDE; | 162 virtual bool IsRenderView() const OVERRIDE; |
163 virtual void PaintAtSize(TransportDIB::Handle dib_handle, | 163 virtual void PaintAtSize(TransportDIB::Handle dib_handle, |
164 int tag, | 164 int tag, |
165 const gfx::Size& page_size, | 165 const gfx::Size& page_size, |
166 const gfx::Size& desired_size) OVERRIDE; | 166 const gfx::Size& desired_size) OVERRIDE; |
167 virtual void Replace(const string16& word) OVERRIDE; | 167 virtual void Replace(const base::string16& word) OVERRIDE; |
168 virtual void ReplaceMisspelling(const string16& word) OVERRIDE; | 168 virtual void ReplaceMisspelling(const base::string16& word) OVERRIDE; |
169 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE; | 169 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE; |
170 virtual void RestartHangMonitorTimeout() OVERRIDE; | 170 virtual void RestartHangMonitorTimeout() OVERRIDE; |
171 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; | 171 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; |
172 virtual void Stop() OVERRIDE; | 172 virtual void Stop() OVERRIDE; |
173 virtual void WasResized() OVERRIDE; | 173 virtual void WasResized() OVERRIDE; |
174 virtual void AddKeyPressEventCallback( | 174 virtual void AddKeyPressEventCallback( |
175 const KeyPressEventCallback& callback) OVERRIDE; | 175 const KeyPressEventCallback& callback) OVERRIDE; |
176 virtual void RemoveKeyPressEventCallback( | 176 virtual void RemoveKeyPressEventCallback( |
177 const KeyPressEventCallback& callback) OVERRIDE; | 177 const KeyPressEventCallback& callback) OVERRIDE; |
178 virtual void AddMouseEventCallback( | 178 virtual void AddMouseEventCallback( |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 // Sets the text of the composition node. | 327 // Sets the text of the composition node. |
328 // This function can also update the cursor position and mark the specified | 328 // This function can also update the cursor position and mark the specified |
329 // range in the composition node. | 329 // range in the composition node. |
330 // A browser should call this function: | 330 // A browser should call this function: |
331 // * when it receives a WM_IME_COMPOSITION message with a GCS_COMPSTR flag | 331 // * when it receives a WM_IME_COMPOSITION message with a GCS_COMPSTR flag |
332 // (on Windows); | 332 // (on Windows); |
333 // * when it receives a "preedit_changed" signal of GtkIMContext (on Linux); | 333 // * when it receives a "preedit_changed" signal of GtkIMContext (on Linux); |
334 // * when markedText of NSTextInput is called (on Mac). | 334 // * when markedText of NSTextInput is called (on Mac). |
335 void ImeSetComposition( | 335 void ImeSetComposition( |
336 const string16& text, | 336 const base::string16& text, |
337 const std::vector<blink::WebCompositionUnderline>& underlines, | 337 const std::vector<blink::WebCompositionUnderline>& underlines, |
338 int selection_start, | 338 int selection_start, |
339 int selection_end); | 339 int selection_end); |
340 | 340 |
341 // Finishes an ongoing composition with the specified text. | 341 // Finishes an ongoing composition with the specified text. |
342 // A browser should call this function: | 342 // A browser should call this function: |
343 // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag | 343 // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag |
344 // (on Windows); | 344 // (on Windows); |
345 // * when it receives a "commit" signal of GtkIMContext (on Linux); | 345 // * when it receives a "commit" signal of GtkIMContext (on Linux); |
346 // * when insertText of NSTextInput is called (on Mac). | 346 // * when insertText of NSTextInput is called (on Mac). |
347 void ImeConfirmComposition(const string16& text, | 347 void ImeConfirmComposition(const base::string16& text, |
348 const gfx::Range& replacement_range, | 348 const gfx::Range& replacement_range, |
349 bool keep_selection); | 349 bool keep_selection); |
350 | 350 |
351 // Cancels an ongoing composition. | 351 // Cancels an ongoing composition. |
352 void ImeCancelComposition(); | 352 void ImeCancelComposition(); |
353 | 353 |
354 // Deletes the current selection plus the specified number of characters | 354 // Deletes the current selection plus the specified number of characters |
355 // before and after the selection or caret. | 355 // before and after the selection or caret. |
356 void ExtendSelectionAndDelete(size_t before, size_t after); | 356 void ExtendSelectionAndDelete(size_t before, size_t after); |
357 | 357 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 // renderer is unresponsive, this will clear that state and call | 644 // renderer is unresponsive, this will clear that state and call |
645 // NotifyRendererResponsive. | 645 // NotifyRendererResponsive. |
646 void RendererIsResponsive(); | 646 void RendererIsResponsive(); |
647 | 647 |
648 // IPC message handlers | 648 // IPC message handlers |
649 void OnRenderViewReady(); | 649 void OnRenderViewReady(); |
650 void OnRenderProcessGone(int status, int error_code); | 650 void OnRenderProcessGone(int status, int error_code); |
651 void OnClose(); | 651 void OnClose(); |
652 void OnUpdateScreenRectsAck(); | 652 void OnUpdateScreenRectsAck(); |
653 void OnRequestMove(const gfx::Rect& pos); | 653 void OnRequestMove(const gfx::Rect& pos); |
654 void OnSetTooltipText(const string16& tooltip_text, | 654 void OnSetTooltipText(const base::string16& tooltip_text, |
655 blink::WebTextDirection text_direction_hint); | 655 blink::WebTextDirection text_direction_hint); |
656 void OnPaintAtSizeAck(int tag, const gfx::Size& size); | 656 void OnPaintAtSizeAck(int tag, const gfx::Size& size); |
657 #if defined(OS_MACOSX) | 657 #if defined(OS_MACOSX) |
658 void OnCompositorSurfaceBuffersSwapped( | 658 void OnCompositorSurfaceBuffersSwapped( |
659 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); | 659 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); |
660 #endif | 660 #endif |
661 bool OnSwapCompositorFrame(const IPC::Message& message); | 661 bool OnSwapCompositorFrame(const IPC::Message& message); |
662 void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, | 662 void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, |
663 gfx::Vector2dF current_fling_velocity); | 663 gfx::Vector2dF current_fling_velocity); |
664 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 664 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 int64 last_input_number_; | 920 int64 last_input_number_; |
921 | 921 |
922 BrowserRenderingStats rendering_stats_; | 922 BrowserRenderingStats rendering_stats_; |
923 | 923 |
924 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 924 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
925 }; | 925 }; |
926 | 926 |
927 } // namespace content | 927 } // namespace content |
928 | 928 |
929 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 929 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |