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

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

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_IME_NULL_INPUT_METHOD_H_
6 #define UI_VIEWS_IME_NULL_INPUT_METHOD_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
msw 2014/03/11 00:58:50 nit: is this explicitly needed here?
Yuki 2014/03/11 15:27:37 base/compiler_specific.h is for OVERRIDE macro. ba
msw 2014/03/11 23:24:37 Sounds good.
10 #include "ui/views/ime/input_method.h"
11
12 namespace views {
13
14 // An implementation of views::InputMethod which does nothing.
15 //
16 // We're working on removing views::InputMethod and all its family and going
msw 2014/03/11 00:58:50 nit: I'm not sure what you mean by "family", pleas
Yuki 2014/03/11 15:27:37 Done.
17 // to use only ui::InputMethod. This class allows us to disable all the effects
18 // come from views::InputMethodBridge by replacing it with this instance,
msw 2014/03/11 00:58:50 nit: "that come from"
Yuki 2014/03/11 15:27:37 Done.
19 // without a big interface change. This class also enables that we can switch
msw 2014/03/11 00:58:50 This sentence and the above needs some grammar wor
Yuki 2014/03/11 15:27:37 Done.
20 // between with and without views::InputMethodBridge in an easy way.
21 class NullInputMethod : public InputMethod {
22 public:
23 NullInputMethod();
24
25 // Overridden from InputMethod:
26 virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE;
27 virtual void Init(Widget* widget) OVERRIDE;
28 virtual void OnFocus() OVERRIDE;
29 virtual void OnBlur() OVERRIDE;
30 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
31 NativeEventResult* result) OVERRIDE;
32 virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE;
33 virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
34 virtual void OnCaretBoundsChanged(View* view) OVERRIDE;
35 virtual void CancelComposition(View* view) OVERRIDE;
36 virtual void OnInputLocaleChanged() OVERRIDE;
37 virtual std::string GetInputLocale() OVERRIDE;
38 virtual bool IsActive() OVERRIDE;
39 virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE;
40 virtual ui::TextInputType GetTextInputType() const OVERRIDE;
41 virtual bool IsCandidatePopupOpen() const OVERRIDE;
42 virtual void ShowImeIfNeeded() OVERRIDE;
43 virtual bool IsMock() const OVERRIDE;
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(NullInputMethod);
47 };
48
49 } // namespace views
50
51 #endif // UI_VIEWS_IME_NULL_INPUT_METHOD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698