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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 int selection_start, | 396 int selection_start, |
397 int selection_end); | 397 int selection_end); |
398 | 398 |
399 // Deletes the ongoing composition if any, inserts the specified text, and | 399 // Deletes the ongoing composition if any, inserts the specified text, and |
400 // moves the cursor. | 400 // moves the cursor. |
401 // A browser should call this function or ImeFinishComposingText: | 401 // A browser should call this function or ImeFinishComposingText: |
402 // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag | 402 // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag |
403 // (on Windows); | 403 // (on Windows); |
404 // * when it receives a "commit" signal of GtkIMContext (on Linux); | 404 // * when it receives a "commit" signal of GtkIMContext (on Linux); |
405 // * when insertText of NSTextInput is called (on Mac). | 405 // * when insertText of NSTextInput is called (on Mac). |
406 void ImeCommitText(const base::string16& text, | 406 void ImeCommitText( |
407 const gfx::Range& replacement_range, | 407 const base::string16& text, |
408 int relative_cursor_pos); | 408 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 409 const gfx::Range& replacement_range, |
| 410 int relative_cursor_pos); |
409 | 411 |
410 // Finishes an ongoing composition. | 412 // Finishes an ongoing composition. |
411 // A browser should call this function or ImeCommitText: | 413 // A browser should call this function or ImeCommitText: |
412 // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag | 414 // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag |
413 // (on Windows); | 415 // (on Windows); |
414 // * when it receives a "commit" signal of GtkIMContext (on Linux); | 416 // * when it receives a "commit" signal of GtkIMContext (on Linux); |
415 // * when insertText of NSTextInput is called (on Mac). | 417 // * when insertText of NSTextInput is called (on Mac). |
416 void ImeFinishComposingText(bool keep_selection); | 418 void ImeFinishComposingText(bool keep_selection); |
417 | 419 |
418 // Cancels an ongoing composition. | 420 // Cancels an ongoing composition. |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 #endif | 908 #endif |
907 | 909 |
908 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 910 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
909 | 911 |
910 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 912 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
911 }; | 913 }; |
912 | 914 |
913 } // namespace content | 915 } // namespace content |
914 | 916 |
915 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 917 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |