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

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

Issue 467073002: Only initialize the input method list for once, no need to re-initialize for each profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 "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_ime_keyboard.h"
11 #include "chromeos/ime/fake_input_method_delegate.h" 11 #include "chromeos/ime/fake_input_method_delegate.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();
22 virtual ~MockInputMethodManager(); 22 virtual ~MockInputMethodManager();
23 23
24 // InputMethodManager override: 24 // InputMethodManager override:
25 virtual State GetState() OVERRIDE; 25 virtual State GetState() OVERRIDE;
26 virtual void InitializeComponentExtension() OVERRIDE;
27 virtual void AddObserver(InputMethodManager::Observer* observer) OVERRIDE; 26 virtual void AddObserver(InputMethodManager::Observer* observer) OVERRIDE;
28 virtual void AddCandidateWindowObserver( 27 virtual void AddCandidateWindowObserver(
29 InputMethodManager::CandidateWindowObserver* observer) OVERRIDE; 28 InputMethodManager::CandidateWindowObserver* observer) OVERRIDE;
30 virtual void RemoveObserver(InputMethodManager::Observer* observer) OVERRIDE; 29 virtual void RemoveObserver(InputMethodManager::Observer* observer) OVERRIDE;
31 virtual void RemoveCandidateWindowObserver( 30 virtual void RemoveCandidateWindowObserver(
32 InputMethodManager::CandidateWindowObserver* observer) OVERRIDE; 31 InputMethodManager::CandidateWindowObserver* observer) OVERRIDE;
33 virtual scoped_ptr<InputMethodDescriptors> 32 virtual scoped_ptr<InputMethodDescriptors>
34 GetSupportedInputMethods() const OVERRIDE; 33 GetSupportedInputMethods() const OVERRIDE;
35 virtual scoped_ptr<InputMethodDescriptors> 34 virtual scoped_ptr<InputMethodDescriptors>
36 GetActiveInputMethods() const OVERRIDE; 35 GetActiveInputMethods() const OVERRIDE;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // The active input method ids cache (actually default only) 105 // The active input method ids cache (actually default only)
107 std::vector<std::string> active_input_method_ids_; 106 std::vector<std::string> active_input_method_ids_;
108 107
109 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager); 108 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager);
110 }; 109 };
111 110
112 } // namespace input_method 111 } // namespace input_method
113 } // namespace chromeos 112 } // namespace chromeos
114 113
115 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_ 114 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698