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

Side by Side Diff: ui/views/ime/input_method.h

Issue 20526005: Implement virtual keyboard hiding. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Init 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 unified diff | Download patch
OLDNEW
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 UI_VIEWS_IME_INPUT_METHOD_H_ 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_H_
6 #define UI_VIEWS_IME_INPUT_METHOD_H_ 6 #define UI_VIEWS_IME_INPUT_METHOD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual ~InputMethod() {} 44 virtual ~InputMethod() {}
45 45
46 // Sets the delegate used by this InputMethod instance. 46 // Sets the delegate used by this InputMethod instance.
47 // This should only be called by the owner Widget or testing code. 47 // This should only be called by the owner Widget or testing code.
48 virtual void SetDelegate(internal::InputMethodDelegate* delegate) = 0; 48 virtual void SetDelegate(internal::InputMethodDelegate* delegate) = 0;
49 49
50 // Initialize the InputMethod object and attach it to the given |widget|. 50 // Initialize the InputMethod object and attach it to the given |widget|.
51 // The |widget| must already be initialized. 51 // The |widget| must already be initialized.
52 virtual void Init(Widget* widget) = 0; 52 virtual void Init(Widget* widget) = 0;
53 53
54 // Called when the top-level Widget gains or loses keyboard focus. 54 // Called when the top-level Widget gains, loses or possibly regains keyboard
55 // These should only be called by the Widget that owns this InputMethod. 55 // focus. These should only be called by the Widget that owns this
56 // InputMethod.
56 virtual void OnFocus() = 0; 57 virtual void OnFocus() = 0;
57 virtual void OnBlur() = 0; 58 virtual void OnBlur() = 0;
59 virtual void OnPossibleRefocus() = 0;
58 60
59 // Called when the focused window receives native IME messages that are not 61 // Called when the focused window receives native IME messages that are not
60 // translated into other predefined event callbacks. Currently this method is 62 // translated into other predefined event callbacks. Currently this method is
61 // used only for IME functionalities specific to Windows. 63 // used only for IME functionalities specific to Windows.
62 // TODO(ime): Break down these messages into platform-neutral methods. 64 // TODO(ime): Break down these messages into platform-neutral methods.
63 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, 65 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
64 NativeEventResult* result) = 0; 66 NativeEventResult* result) = 0;
65 67
66 // Dispatch a key event to the input method. The key event will be dispatched 68 // Dispatch a key event to the input method. The key event will be dispatched
67 // back to the caller via InputMethodDelegate::DispatchKeyEventPostIME(), once 69 // back to the caller via InputMethodDelegate::DispatchKeyEventPostIME(), once
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 122
121 // Returns true if the input method is a mock instance used for testing. 123 // Returns true if the input method is a mock instance used for testing.
122 virtual bool IsMock() const = 0; 124 virtual bool IsMock() const = 0;
123 125
124 // TODO(suzhe): Support mouse/touch event. 126 // TODO(suzhe): Support mouse/touch event.
125 }; 127 };
126 128
127 } // namespace views 129 } // namespace views
128 130
129 #endif // UI_VIEWS_IME_INPUT_METHOD_H_ 131 #endif // UI_VIEWS_IME_INPUT_METHOD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698