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

Side by Side Diff: ui/base/ime/input_method_base.h

Issue 45733008: sk6_charactercomposer: Merged DispatchKeyEvent and its fabricated version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « ui/base/ime/input_method.h ('k') | ui/base/ime/input_method_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BASE_IME_INPUT_METHOD_BASE_H_ 5 #ifndef UI_BASE_IME_INPUT_METHOD_BASE_H_
6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_ 6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Checks if the focused text input client's text input type is 65 // Checks if the focused text input client's text input type is
66 // TEXT_INPUT_TYPE_NONE. Also returns true if there is no focused text 66 // TEXT_INPUT_TYPE_NONE. Also returns true if there is no focused text
67 // input client. 67 // input client.
68 bool IsTextInputTypeNone() const; 68 bool IsTextInputTypeNone() const;
69 69
70 // Convenience method to call the focused text input client's 70 // Convenience method to call the focused text input client's
71 // OnInputMethodChanged() method. It'll only take effect if the current text 71 // OnInputMethodChanged() method. It'll only take effect if the current text
72 // input type is not TEXT_INPUT_TYPE_NONE. 72 // input type is not TEXT_INPUT_TYPE_NONE.
73 void OnInputMethodChanged() const; 73 void OnInputMethodChanged() const;
74 74
75 // Convenience method to call delegate_->DispatchKeyEventPostIME(). 75 // Convenience method to call delegate_->DispatchKeyEventPostIME()
76 // Returns true if the event was processed 76 // or delegate_->DispatchFabricatedKeyEventPostIME() considering if
77 bool DispatchKeyEventPostIME(const base::NativeEvent& native_event) const; 77 // |event| contains the native event or not. Returns true if the
78 78 // event was processed.
79 // Convenience method to call delegate_->DispatchFabricatedKeyEventPostIME(). 79 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) const;
80 // Returns true if the event was processed
81 bool DispatchFabricatedKeyEventPostIME(EventType type,
82 KeyboardCode key_code,
83 int flags) const;
84 80
85 // Convenience method to notify all observers of TextInputClient changes. 81 // Convenience method to notify all observers of TextInputClient changes.
86 void NotifyTextInputStateChanged(const TextInputClient* client); 82 void NotifyTextInputStateChanged(const TextInputClient* client);
87 83
88 bool system_toplevel_window_focused() const { 84 bool system_toplevel_window_focused() const {
89 return system_toplevel_window_focused_; 85 return system_toplevel_window_focused_;
90 } 86 }
91 87
92 private: 88 private:
93 void SetFocusedTextInputClientInternal(TextInputClient* client); 89 void SetFocusedTextInputClientInternal(TextInputClient* client);
94 90
95 internal::InputMethodDelegate* delegate_; 91 internal::InputMethodDelegate* delegate_;
96 TextInputClient* text_input_client_; 92 TextInputClient* text_input_client_;
97 93
98 ObserverList<InputMethodObserver> observer_list_; 94 ObserverList<InputMethodObserver> observer_list_;
99 95
100 bool system_toplevel_window_focused_; 96 bool system_toplevel_window_focused_;
101 97
102 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); 98 DISALLOW_COPY_AND_ASSIGN(InputMethodBase);
103 }; 99 };
104 100
105 } // namespace ui 101 } // namespace ui
106 102
107 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ 103 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_
OLDNEW
« no previous file with comments | « ui/base/ime/input_method.h ('k') | ui/base/ime/input_method_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698