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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 22 matching lines...) Expand all
33 void RemoveInputMethodExtension(const std::string& extension_id) override; 33 void RemoveInputMethodExtension(const std::string& extension_id) override;
34 void ChangeInputMethod(const std::string& input_method_id, 34 void ChangeInputMethod(const std::string& input_method_id,
35 bool show_message) override; 35 bool show_message) override;
36 bool EnableInputMethod( 36 bool EnableInputMethod(
37 const std::string& new_active_input_method_id) override; 37 const std::string& new_active_input_method_id) override;
38 void EnableLoginLayouts( 38 void EnableLoginLayouts(
39 const std::string& language_code, 39 const std::string& language_code,
40 const std::vector<std::string>& initial_layouts) override; 40 const std::vector<std::string>& initial_layouts) override;
41 void EnableLockScreenLayouts() override; 41 void EnableLockScreenLayouts() override;
42 void GetInputMethodExtensions(InputMethodDescriptors* result) override; 42 void GetInputMethodExtensions(InputMethodDescriptors* result) override;
43 scoped_ptr<InputMethodDescriptors> GetActiveInputMethods() const override; 43 std::unique_ptr<InputMethodDescriptors> GetActiveInputMethods()
44 const override;
44 const std::vector<std::string>& GetActiveInputMethodIds() const override; 45 const std::vector<std::string>& GetActiveInputMethodIds() const override;
45 const InputMethodDescriptor* GetInputMethodFromId( 46 const InputMethodDescriptor* GetInputMethodFromId(
46 const std::string& input_method_id) const override; 47 const std::string& input_method_id) const override;
47 size_t GetNumActiveInputMethods() const override; 48 size_t GetNumActiveInputMethods() const override;
48 void SetEnabledExtensionImes(std::vector<std::string>* ids) override; 49 void SetEnabledExtensionImes(std::vector<std::string>* ids) override;
49 void SetInputMethodLoginDefault() override; 50 void SetInputMethodLoginDefault() override;
50 void SetInputMethodLoginDefaultFromVPD(const std::string& locale, 51 void SetInputMethodLoginDefaultFromVPD(const std::string& locale,
51 const std::string& layout) override; 52 const std::string& layout) override;
52 bool CanCycleInputMethod() override; 53 bool CanCycleInputMethod() override;
53 void SwitchToNextInputMethod() override; 54 void SwitchToNextInputMethod() override;
(...skipping 25 matching lines...) Expand all
79 void AddObserver(InputMethodManager::Observer* observer) override; 80 void AddObserver(InputMethodManager::Observer* observer) override;
80 void AddCandidateWindowObserver( 81 void AddCandidateWindowObserver(
81 InputMethodManager::CandidateWindowObserver* observer) override; 82 InputMethodManager::CandidateWindowObserver* observer) override;
82 void AddImeMenuObserver( 83 void AddImeMenuObserver(
83 InputMethodManager::ImeMenuObserver* observer) override; 84 InputMethodManager::ImeMenuObserver* observer) override;
84 void RemoveObserver(InputMethodManager::Observer* observer) override; 85 void RemoveObserver(InputMethodManager::Observer* observer) override;
85 void RemoveCandidateWindowObserver( 86 void RemoveCandidateWindowObserver(
86 InputMethodManager::CandidateWindowObserver* observer) override; 87 InputMethodManager::CandidateWindowObserver* observer) override;
87 void RemoveImeMenuObserver( 88 void RemoveImeMenuObserver(
88 InputMethodManager::ImeMenuObserver* observer) override; 89 InputMethodManager::ImeMenuObserver* observer) override;
89 scoped_ptr<InputMethodDescriptors> GetSupportedInputMethods() const override; 90 std::unique_ptr<InputMethodDescriptors> GetSupportedInputMethods()
91 const override;
90 void ActivateInputMethodMenuItem(const std::string& key) override; 92 void ActivateInputMethodMenuItem(const std::string& key) override;
91 bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override; 93 bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override;
92 bool IsAltGrUsedByCurrentInputMethod() const override; 94 bool IsAltGrUsedByCurrentInputMethod() const override;
93 ImeKeyboard* GetImeKeyboard() override; 95 ImeKeyboard* GetImeKeyboard() override;
94 InputMethodUtil* GetInputMethodUtil() override; 96 InputMethodUtil* GetInputMethodUtil() override;
95 ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override; 97 ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override;
96 bool IsLoginKeyboard(const std::string& layout) const override; 98 bool IsLoginKeyboard(const std::string& layout) const override;
97 bool MigrateInputMethods(std::vector<std::string>* input_method_ids) override; 99 bool MigrateInputMethods(std::vector<std::string>* input_method_ids) override;
98 scoped_refptr<InputMethodManager::State> CreateNewState( 100 scoped_refptr<InputMethodManager::State> CreateNewState(
99 Profile* profile) override; 101 Profile* profile) override;
100 scoped_refptr<InputMethodManager::State> GetActiveIMEState() override; 102 scoped_refptr<InputMethodManager::State> GetActiveIMEState() override;
101 void SetState(scoped_refptr<InputMethodManager::State> state) override; 103 void SetState(scoped_refptr<InputMethodManager::State> state) override;
102 void ImeMenuActivationChanged(bool is_active) override; 104 void ImeMenuActivationChanged(bool is_active) override;
103 void NotifyImeMenuItemsChanged( 105 void NotifyImeMenuItemsChanged(
104 const std::string& engine_id, 106 const std::string& engine_id,
105 const std::vector<InputMethodManager::MenuItem>& items) override; 107 const std::vector<InputMethodManager::MenuItem>& items) override;
106 108
107 // Sets an input method ID which will be returned by GetCurrentInputMethod(). 109 // Sets an input method ID which will be returned by GetCurrentInputMethod().
108 void SetCurrentInputMethodId(const std::string& input_method_id); 110 void SetCurrentInputMethodId(const std::string& input_method_id);
109 111
110 void SetComponentExtensionIMEManager( 112 void SetComponentExtensionIMEManager(
111 scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager); 113 std::unique_ptr<ComponentExtensionIMEManager> comp_ime_manager);
112 114
113 // Set values that will be provided to the InputMethodUtil. 115 // Set values that will be provided to the InputMethodUtil.
114 void set_application_locale(const std::string& value); 116 void set_application_locale(const std::string& value);
115 117
116 // Set the value returned by IsISOLevel5ShiftUsedByCurrentInputMethod 118 // Set the value returned by IsISOLevel5ShiftUsedByCurrentInputMethod
117 void set_mod3_used(bool value) { mod3_used_ = value; } 119 void set_mod3_used(bool value) { mod3_used_ = value; }
118 120
119 // TODO(yusukes): Add more variables for counting the numbers of the API calls 121 // TODO(yusukes): Add more variables for counting the numbers of the API calls
120 int add_observer_count_; 122 int add_observer_count_;
121 int remove_observer_count_; 123 int remove_observer_count_;
122 124
123 protected: 125 protected:
124 scoped_refptr<State> state_; 126 scoped_refptr<State> state_;
125 127
126 private: 128 private:
127 FakeInputMethodDelegate delegate_; // used by util_ 129 FakeInputMethodDelegate delegate_; // used by util_
128 InputMethodUtil util_; 130 InputMethodUtil util_;
129 FakeImeKeyboard keyboard_; 131 FakeImeKeyboard keyboard_;
130 bool mod3_used_; 132 bool mod3_used_;
131 scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager_; 133 std::unique_ptr<ComponentExtensionIMEManager> comp_ime_manager_;
132 134
133 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager); 135 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager);
134 }; 136 };
135 137
136 } // namespace input_method 138 } // namespace input_method
137 } // namespace chromeos 139 } // namespace chromeos
138 140
139 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_ 141 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698