Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: ui/base/ime/win/imm32_manager.h

Issue 21189003: Change IME conversion status by focusing input element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [WIP] Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/ime/win/imm32_manager.h
diff --git a/ui/base/ime/win/imm32_manager.h b/ui/base/ime/win/imm32_manager.h
index 08776abbd3207265908cb3bc619bbaf40dfdc31d..0f37a3ae157e8cb47682a5e48dbe7aecccd16d2e 100644
--- a/ui/base/ime/win/imm32_manager.h
+++ b/ui/base/ime/win/imm32_manager.h
@@ -77,10 +77,10 @@ struct CompositionText;
class UI_EXPORT IMM32Manager {
public:
IMM32Manager();
- ~IMM32Manager();
+ virtual ~IMM32Manager();
// Retrieves whether or not there is an ongoing composition.
- bool is_composing() const { return is_composing_; }
+ virtual bool is_composing() const { return is_composing_; }
jochen (gone - plz use gerrit) 2013/08/07 02:25:23 i think it's enough to make the methods virtual wh
yoichio 2013/08/07 03:33:55 Done.
// Retrieves the input language from Windows and update it.
// Return values
@@ -88,13 +88,13 @@ class UI_EXPORT IMM32Manager {
// The given input language has IMEs.
// * false
// The given input language does not have IMEs.
- bool SetInputLanguage();
+ virtual bool SetInputLanguage();
// Creates the IME windows, and allocate required resources for them.
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void CreateImeWindow(HWND window_handle);
+ virtual void CreateImeWindow(HWND window_handle);
// Updates the style of the IME windows.
// Parameters
@@ -115,27 +115,28 @@ class UI_EXPORT IMM32Manager {
// All the window styles set in this function are over-written when
// calling ::DefWindowProc() after returning this function.
// Returns the value returned by DefWindowProc.
- LRESULT SetImeWindowStyle(HWND window_handle, UINT message,
- WPARAM wparam, LPARAM lparam, BOOL* handled);
+ virtual LRESULT SetImeWindowStyle(HWND window_handle, UINT message,
+ WPARAM wparam, LPARAM lparam,
+ BOOL* handled);
// Destroys the IME windows and all the resources attached to them.
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void DestroyImeWindow(HWND window_handle);
+ virtual void DestroyImeWindow(HWND window_handle);
// Updates the position of the IME windows.
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void UpdateImeWindow(HWND window_handle);
+ virtual void UpdateImeWindow(HWND window_handle);
// Cleans up the all resources attached to the given IMM32Manager object, and
// reset its composition status.
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void CleanupComposition(HWND window_handle);
+ virtual void CleanupComposition(HWND window_handle);
// Resets the composition status.
// Cancel the ongoing composition if it exists.
@@ -143,7 +144,7 @@ class UI_EXPORT IMM32Manager {
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void ResetComposition(HWND window_handle);
+ virtual void ResetComposition(HWND window_handle);
// Retrieves a composition result of the ongoing composition if it exists.
// Parameters
@@ -164,7 +165,7 @@ class UI_EXPORT IMM32Manager {
// Remarks
// This function is designed for being called from WM_IME_COMPOSITION
// message handlers.
- bool GetResult(HWND window_handle, LPARAM lparam, string16* result);
+ virtual bool GetResult(HWND window_handle, LPARAM lparam, string16* result);
// Retrieves the current composition status of the ongoing composition.
// Parameters
@@ -185,8 +186,8 @@ class UI_EXPORT IMM32Manager {
// Remarks
// This function is designed for being called from WM_IME_COMPOSITION
// message handlers.
- bool GetComposition(HWND window_handle, LPARAM lparam,
- CompositionText* composition);
+ virtual bool GetComposition(HWND window_handle, LPARAM lparam,
+ CompositionText* composition);
// Enables the IME attached to the given window, i.e. allows user-input
// events to be dispatched to the IME.
@@ -202,7 +203,7 @@ class UI_EXPORT IMM32Manager {
// + false
// Just move the IME windows of the ongoing composition to the given
// position without finishing it.
- void EnableIME(HWND window_handle);
+ virtual void EnableIME(HWND window_handle);
// Disables the IME attached to the given window, i.e. prohibits any
// user-input events from being dispatched to the IME.
@@ -211,13 +212,13 @@ class UI_EXPORT IMM32Manager {
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void DisableIME(HWND window_handle);
+ virtual void DisableIME(HWND window_handle);
// Cancels an ongoing composition of the IME attached to the given window.
// Parameters
// * window_handle [in] (HWND)
// Represents the window handle of the caller.
- void CancelIME(HWND window_handle);
+ virtual void CancelIME(HWND window_handle);
// Updates the caret position of the given window.
// Parameters
@@ -226,22 +227,22 @@ class UI_EXPORT IMM32Manager {
// * caret_rect [in] (const gfx::Rect&)
// Represent the rectangle of the input caret.
// This rectangle is used for controlling the positions of IME windows.
- void UpdateCaretRect(HWND window_handle, const gfx::Rect& caret_rect);
+ virtual void UpdateCaretRect(HWND window_handle, const gfx::Rect& caret_rect);
// Updates the setting whether we want IME to render composition text.
- void SetUseCompositionWindow(bool use_composition_window);
+ virtual void SetUseCompositionWindow(bool use_composition_window);
// Returns the current input language id.
- LANGID input_language_id() const { return input_language_id_; }
+ virtual LANGID input_language_id() const { return input_language_id_; }
// Returns BCP-47 tag name of the current input language.
- std::string GetInputLanguageName() const;
+ virtual std::string GetInputLanguageName() const;
// Returns the text direction of the current input language.
- base::i18n::TextDirection GetTextDirection() const;
+ virtual base::i18n::TextDirection GetTextDirection() const;
// Sets conversion status corresponding to |input_mode|.
- void SetTextInputMode(HWND window_handle, TextInputMode input_mode);
+ virtual void SetTextInputMode(HWND window_handle, TextInputMode input_mode);
// Helper functions ----------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698