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

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

Issue 1615073005: Revert of Makes sure the keyboard typing isn't blocked when InputMethod::OnFocus() is not correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « ui/base/ime/input_method_win.cc ('k') | ui/base/ime/mock_input_method.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_MOCK_INPUT_METHOD_H_ 5 #ifndef UI_BASE_IME_MOCK_INPUT_METHOD_H_
6 #define UI_BASE_IME_MOCK_INPUT_METHOD_H_ 6 #define UI_BASE_IME_MOCK_INPUT_METHOD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "ui/base/ime/input_method.h" 13 #include "ui/base/ime/input_method.h"
14 #include "ui/base/ime/input_method_observer.h" 14 #include "ui/base/ime/input_method_observer.h"
15 #include "ui/base/ime/ui_base_ime_export.h" 15 #include "ui/base/ime/ui_base_ime_export.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 class InputMethodLogCollector;
20 class KeyEvent; 19 class KeyEvent;
21 class TextInputClient; 20 class TextInputClient;
22 21
23 // A mock ui::InputMethod implementation for testing. You can get the instance 22 // A mock ui::InputMethod implementation for testing. You can get the instance
24 // of this class as the global input method with calling 23 // of this class as the global input method with calling
25 // SetUpInputMethodFactoryForTesting() which is declared in 24 // SetUpInputMethodFactoryForTesting() which is declared in
26 // ui/base/ime/input_method_factory.h 25 // ui/base/ime/input_method_factory.h
27 class UI_BASE_IME_EXPORT MockInputMethod 26 class UI_BASE_IME_EXPORT MockInputMethod
28 : NON_EXPORTED_BASE(public InputMethod) { 27 : NON_EXPORTED_BASE(public InputMethod) {
29 public: 28 public:
(...skipping 16 matching lines...) Expand all
46 void OnInputLocaleChanged() override; 45 void OnInputLocaleChanged() override;
47 std::string GetInputLocale() override; 46 std::string GetInputLocale() override;
48 TextInputType GetTextInputType() const override; 47 TextInputType GetTextInputType() const override;
49 TextInputMode GetTextInputMode() const override; 48 TextInputMode GetTextInputMode() const override;
50 int GetTextInputFlags() const override; 49 int GetTextInputFlags() const override;
51 bool CanComposeInline() const override; 50 bool CanComposeInline() const override;
52 bool IsCandidatePopupOpen() const override; 51 bool IsCandidatePopupOpen() const override;
53 void ShowImeIfNeeded() override; 52 void ShowImeIfNeeded() override;
54 void AddObserver(InputMethodObserver* observer) override; 53 void AddObserver(InputMethodObserver* observer) override;
55 void RemoveObserver(InputMethodObserver* observer) override; 54 void RemoveObserver(InputMethodObserver* observer) override;
56 InputMethodLogCollector* GetLogCollector() override;
57 55
58 private: 56 private:
59 TextInputClient* text_input_client_; 57 TextInputClient* text_input_client_;
60 base::ObserverList<InputMethodObserver> observer_list_; 58 base::ObserverList<InputMethodObserver> observer_list_;
61 internal::InputMethodDelegate* delegate_; 59 internal::InputMethodDelegate* delegate_;
62 60
63 DISALLOW_COPY_AND_ASSIGN(MockInputMethod); 61 DISALLOW_COPY_AND_ASSIGN(MockInputMethod);
64 }; 62 };
65 63
66 } // namespace ui 64 } // namespace ui
67 65
68 #endif // UI_BASE_IME_MOCK_INPUT_METHOD_H_ 66 #endif // UI_BASE_IME_MOCK_INPUT_METHOD_H_
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_win.cc ('k') | ui/base/ime/mock_input_method.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698