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

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

Issue 187313002: Update StickyKeys overlay to show or hide AltGr depending on the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase 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
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/fake_input_method_delegate.h" 9 #include "chromeos/ime/fake_input_method_delegate.h"
10 #include "chromeos/ime/fake_xkeyboard.h" 10 #include "chromeos/ime/fake_xkeyboard.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual void RemoveInputMethodExtension(const std::string& id) OVERRIDE; 51 virtual void RemoveInputMethodExtension(const std::string& id) OVERRIDE;
52 virtual void GetInputMethodExtensions( 52 virtual void GetInputMethodExtensions(
53 InputMethodDescriptors* result) OVERRIDE; 53 InputMethodDescriptors* result) OVERRIDE;
54 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE; 54 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE;
55 virtual void SetInputMethodLoginDefault() OVERRIDE; 55 virtual void SetInputMethodLoginDefault() OVERRIDE;
56 virtual bool SwitchToNextInputMethod() OVERRIDE; 56 virtual bool SwitchToNextInputMethod() OVERRIDE;
57 virtual bool SwitchToPreviousInputMethod( 57 virtual bool SwitchToPreviousInputMethod(
58 const ui::Accelerator& accelerator) OVERRIDE; 58 const ui::Accelerator& accelerator) OVERRIDE;
59 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE; 59 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE;
60 virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE; 60 virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE;
61 virtual bool IsISOLevel5ShiftUsedByCurrentInputMethod() const OVERRIDE;
62 virtual bool IsAltGrUsedByCurrentInputMethod() const OVERRIDE;
61 virtual XKeyboard* GetXKeyboard() OVERRIDE; 63 virtual XKeyboard* GetXKeyboard() OVERRIDE;
62 virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE; 64 virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE;
63 virtual ComponentExtensionIMEManager* 65 virtual ComponentExtensionIMEManager*
64 GetComponentExtensionIMEManager() OVERRIDE; 66 GetComponentExtensionIMEManager() OVERRIDE;
65 virtual bool IsLoginKeyboard(const std::string& layout) const OVERRIDE; 67 virtual bool IsLoginKeyboard(const std::string& layout) const OVERRIDE;
66 virtual bool MigrateXkbInputMethods( 68 virtual bool MigrateXkbInputMethods(
67 std::vector<std::string>* input_method_ids) OVERRIDE; 69 std::vector<std::string>* input_method_ids) OVERRIDE;
68 70
69 // Sets an input method ID which will be returned by GetCurrentInputMethod(). 71 // Sets an input method ID which will be returned by GetCurrentInputMethod().
70 void SetCurrentInputMethodId(const std::string& input_method_id) { 72 void SetCurrentInputMethodId(const std::string& input_method_id) {
71 current_input_method_id_ = input_method_id; 73 current_input_method_id_ = input_method_id;
72 } 74 }
73 75
74 // Set values that will be provided to the InputMethodUtil. 76 // Set values that will be provided to the InputMethodUtil.
75 void set_application_locale(const std::string& value); 77 void set_application_locale(const std::string& value);
76 78
79 // Set the value returned by IsISOLevel5ShiftUsedByCurrentInputMethod
80 void set_mod3_used(bool value) { mod3_used_ = value; }
81
77 // TODO(yusukes): Add more variables for counting the numbers of the API calls 82 // TODO(yusukes): Add more variables for counting the numbers of the API calls
78 int add_observer_count_; 83 int add_observer_count_;
79 int remove_observer_count_; 84 int remove_observer_count_;
80 85
81 private: 86 private:
82 // The value GetCurrentInputMethod().id() will return. 87 // The value GetCurrentInputMethod().id() will return.
83 std::string current_input_method_id_; 88 std::string current_input_method_id_;
84 89
85 InputMethodWhitelist whitelist_; 90 InputMethodWhitelist whitelist_;
86 FakeInputMethodDelegate delegate_; // used by util_ 91 FakeInputMethodDelegate delegate_; // used by util_
87 InputMethodUtil util_; 92 InputMethodUtil util_;
88 FakeXKeyboard xkeyboard_; 93 FakeXKeyboard xkeyboard_;
94 bool mod3_used_;
89 95
90 // The active input method ids cache (actually default only) 96 // The active input method ids cache (actually default only)
91 std::vector<std::string> active_input_method_ids_; 97 std::vector<std::string> active_input_method_ids_;
92 98
93 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager); 99 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager);
94 }; 100 };
95 101
96 } // namespace input_method 102 } // namespace input_method
97 } // namespace chromeos 103 } // namespace chromeos
98 104
99 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_ 105 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698