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

Side by Side Diff: chrome/browser/chromeos/input_method/mock_input_method_manager.h

Issue 232333002: ozone: Rename XKeyboard to KeyboardController & use fake under ozone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to ImeKeyboard & rebase Created 6 years, 8 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
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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
7 7
8 #include "chrome/browser/chromeos/input_method/input_method_util.h" 8 #include "chrome/browser/chromeos/input_method/input_method_util.h"
9 #include "chromeos/ime/component_extension_ime_manager.h" 9 #include "chromeos/ime/component_extension_ime_manager.h"
10 #include "chromeos/ime/fake_ime_keyboard.h"
10 #include "chromeos/ime/fake_input_method_delegate.h" 11 #include "chromeos/ime/fake_input_method_delegate.h"
11 #include "chromeos/ime/fake_xkeyboard.h"
12 #include "chromeos/ime/input_method_manager.h" 12 #include "chromeos/ime/input_method_manager.h"
13 #include "chromeos/ime/input_method_whitelist.h" 13 #include "chromeos/ime/input_method_whitelist.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 namespace input_method { 16 namespace input_method {
17 17
18 // The mock implementation of InputMethodManager for testing. 18 // The mock implementation of InputMethodManager for testing.
19 class MockInputMethodManager : public InputMethodManager { 19 class MockInputMethodManager : public InputMethodManager {
20 public: 20 public:
21 MockInputMethodManager(); 21 MockInputMethodManager();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 InputMethodDescriptors* result) OVERRIDE; 54 InputMethodDescriptors* result) OVERRIDE;
55 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE; 55 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE;
56 virtual void SetInputMethodLoginDefault() OVERRIDE; 56 virtual void SetInputMethodLoginDefault() OVERRIDE;
57 virtual bool SwitchToNextInputMethod() OVERRIDE; 57 virtual bool SwitchToNextInputMethod() OVERRIDE;
58 virtual bool SwitchToPreviousInputMethod( 58 virtual bool SwitchToPreviousInputMethod(
59 const ui::Accelerator& accelerator) OVERRIDE; 59 const ui::Accelerator& accelerator) OVERRIDE;
60 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE; 60 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE;
61 virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE; 61 virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE;
62 virtual bool IsISOLevel5ShiftUsedByCurrentInputMethod() const OVERRIDE; 62 virtual bool IsISOLevel5ShiftUsedByCurrentInputMethod() const OVERRIDE;
63 virtual bool IsAltGrUsedByCurrentInputMethod() const OVERRIDE; 63 virtual bool IsAltGrUsedByCurrentInputMethod() const OVERRIDE;
64 virtual XKeyboard* GetXKeyboard() OVERRIDE; 64 virtual ImeKeyboard* GetImeKeyboard() OVERRIDE;
65 virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE; 65 virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE;
66 virtual ComponentExtensionIMEManager* 66 virtual ComponentExtensionIMEManager*
67 GetComponentExtensionIMEManager() OVERRIDE; 67 GetComponentExtensionIMEManager() OVERRIDE;
68 virtual bool IsLoginKeyboard(const std::string& layout) const OVERRIDE; 68 virtual bool IsLoginKeyboard(const std::string& layout) const OVERRIDE;
69 virtual bool MigrateXkbInputMethods( 69 virtual bool MigrateXkbInputMethods(
70 std::vector<std::string>* input_method_ids) OVERRIDE; 70 std::vector<std::string>* input_method_ids) OVERRIDE;
71 71
72 // Sets an input method ID which will be returned by GetCurrentInputMethod(). 72 // Sets an input method ID which will be returned by GetCurrentInputMethod().
73 void SetCurrentInputMethodId(const std::string& input_method_id) { 73 void SetCurrentInputMethodId(const std::string& input_method_id) {
74 current_input_method_id_ = input_method_id; 74 current_input_method_id_ = input_method_id;
(...skipping 12 matching lines...) Expand all
87 int add_observer_count_; 87 int add_observer_count_;
88 int remove_observer_count_; 88 int remove_observer_count_;
89 89
90 private: 90 private:
91 // The value GetCurrentInputMethod().id() will return. 91 // The value GetCurrentInputMethod().id() will return.
92 std::string current_input_method_id_; 92 std::string current_input_method_id_;
93 93
94 InputMethodWhitelist whitelist_; 94 InputMethodWhitelist whitelist_;
95 FakeInputMethodDelegate delegate_; // used by util_ 95 FakeInputMethodDelegate delegate_; // used by util_
96 InputMethodUtil util_; 96 InputMethodUtil util_;
97 FakeXKeyboard xkeyboard_; 97 FakeImeKeyboard keyboard_;
98 bool mod3_used_; 98 bool mod3_used_;
99 scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager_; 99 scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager_;
100 100
101 // The active input method ids cache (actually default only) 101 // The active input method ids cache (actually default only)
102 std::vector<std::string> active_input_method_ids_; 102 std::vector<std::string> active_input_method_ids_;
103 103
104 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager); 104 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager);
105 }; 105 };
106 106
107 } // namespace input_method 107 } // namespace input_method
108 } // namespace chromeos 108 } // namespace chromeos
109 109
110 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_ 110 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698