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

Side by Side Diff: ui/base/ime/chromeos/mock_input_method_manager.h

Issue 2605843002: Add MockInputMethodManager under ui/base/ime/chromeos/ (Closed)
Patch Set: Created 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_
6 #define UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_
7
8 #include "base/macros.h"
9 #include "ui/base/ime/chromeos/input_method_manager.h"
10
11 namespace chromeos {
12 namespace input_method {
13 class InputMethodUtil;
14 class ImeKeyboard;
15
16 // The mock InputMethodManager for testing.
17 class UI_BASE_IME_EXPORT MockInputMethodManager : public InputMethodManager {
18 public:
19 MockInputMethodManager();
20 ~MockInputMethodManager() override;
21
22 // InputMethodManager override:
23 UISessionState GetUISessionState() override;
24 void AddObserver(InputMethodManager::Observer* observer) override;
25 void AddCandidateWindowObserver(
26 InputMethodManager::CandidateWindowObserver* observer) override;
27 void AddImeMenuObserver(
28 InputMethodManager::ImeMenuObserver* observer) override;
29 void RemoveObserver(InputMethodManager::Observer* observer) override;
30 void RemoveCandidateWindowObserver(
31 InputMethodManager::CandidateWindowObserver* observer) override;
32 void RemoveImeMenuObserver(
33 InputMethodManager::ImeMenuObserver* observer) override;
34 std::unique_ptr<InputMethodDescriptors> GetSupportedInputMethods()
35 const override;
36 void ActivateInputMethodMenuItem(const std::string& key) override;
37 bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override;
38 bool IsAltGrUsedByCurrentInputMethod() const override;
39 ImeKeyboard* GetImeKeyboard() override;
40 InputMethodUtil* GetInputMethodUtil() override;
41 ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override;
42 bool IsLoginKeyboard(const std::string& layout) const override;
43 bool MigrateInputMethods(std::vector<std::string>* input_method_ids) override;
44 scoped_refptr<InputMethodManager::State> CreateNewState(
45 Profile* profile) override;
46 scoped_refptr<InputMethodManager::State> GetActiveIMEState() override;
47 void SetState(scoped_refptr<InputMethodManager::State> state) override;
48 void ImeMenuActivationChanged(bool is_active) override;
49 void NotifyImeMenuItemsChanged(
50 const std::string& engine_id,
51 const std::vector<InputMethodManager::MenuItem>& items) override;
52 void MaybeNotifyImeMenuActivationChanged() override;
53 void OverrideKeyboardUrlRef(const std::string& keyset) override;
54 bool IsEmojiHandwritingVoiceOnImeMenuEnabled() override;
55
56 private:
57 DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager);
58 };
59
60 } // namespace input_method
61 } // namespace chromeos
62
63 #endif // UI_BASE_IME_CHROMEOS_MOCK_INPUT_METHOD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698