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

Unified Diff: chrome/browser/chromeos/input_method/mock_input_method_manager_impl.h

Issue 2605843002: Add MockInputMethodManager under ui/base/ime/chromeos/ (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/mock_input_method_manager_impl.h
diff --git a/chrome/browser/chromeos/input_method/mock_input_method_manager.h b/chrome/browser/chromeos/input_method/mock_input_method_manager_impl.h
similarity index 76%
rename from chrome/browser/chromeos/input_method/mock_input_method_manager.h
rename to chrome/browser/chromeos/input_method/mock_input_method_manager_impl.h
index 168de62a8e2cbd032c08a74a0ad2be2db3744c21..87e51825b3369b786d92b26b6f6fbe8c97c0705f 100644
--- a/chrome/browser/chromeos/input_method/mock_input_method_manager.h
+++ b/chrome/browser/chromeos/input_method/mock_input_method_manager_impl.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
-#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
+#ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_IMPL_H_
+#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_IMPL_H_
#include <stddef.h>
@@ -14,16 +14,17 @@
#include "ui/base/ime/chromeos/fake_input_method_delegate.h"
#include "ui/base/ime/chromeos/input_method_manager.h"
#include "ui/base/ime/chromeos/input_method_whitelist.h"
+#include "ui/base/ime/chromeos/mock_input_method_manager.h"
namespace chromeos {
namespace input_method {
// The mock implementation of InputMethodManager for testing.
-class MockInputMethodManager : public InputMethodManager {
+class MockInputMethodManagerImpl : public MockInputMethodManager {
public:
class State : public InputMethodManager::State {
public:
- explicit State(MockInputMethodManager* manager);
+ explicit State(MockInputMethodManagerImpl* manager);
scoped_refptr<InputMethodManager::State> Clone() const override;
void AddInputMethodExtension(
@@ -72,42 +73,22 @@ class MockInputMethodManager : public InputMethodManager {
MockInputMethodManager* const manager_;
};
- MockInputMethodManager();
- ~MockInputMethodManager() override;
+ MockInputMethodManagerImpl();
+ ~MockInputMethodManagerImpl() override;
- // InputMethodManager override:
- UISessionState GetUISessionState() override;
+ // MockInputMethodManager:
void AddObserver(InputMethodManager::Observer* observer) override;
- void AddCandidateWindowObserver(
- InputMethodManager::CandidateWindowObserver* observer) override;
- void AddImeMenuObserver(
- InputMethodManager::ImeMenuObserver* observer) override;
void RemoveObserver(InputMethodManager::Observer* observer) override;
- void RemoveCandidateWindowObserver(
- InputMethodManager::CandidateWindowObserver* observer) override;
- void RemoveImeMenuObserver(
- InputMethodManager::ImeMenuObserver* observer) override;
std::unique_ptr<InputMethodDescriptors> GetSupportedInputMethods()
const override;
- void ActivateInputMethodMenuItem(const std::string& key) override;
bool IsISOLevel5ShiftUsedByCurrentInputMethod() const override;
- bool IsAltGrUsedByCurrentInputMethod() const override;
ImeKeyboard* GetImeKeyboard() override;
InputMethodUtil* GetInputMethodUtil() override;
ComponentExtensionIMEManager* GetComponentExtensionIMEManager() override;
- bool IsLoginKeyboard(const std::string& layout) const override;
- bool MigrateInputMethods(std::vector<std::string>* input_method_ids) override;
scoped_refptr<InputMethodManager::State> CreateNewState(
Profile* profile) override;
scoped_refptr<InputMethodManager::State> GetActiveIMEState() override;
void SetState(scoped_refptr<InputMethodManager::State> state) override;
- void ImeMenuActivationChanged(bool is_active) override;
- void NotifyImeMenuItemsChanged(
- const std::string& engine_id,
- const std::vector<InputMethodManager::MenuItem>& items) override;
- void MaybeNotifyImeMenuActivationChanged() override;
- void OverrideKeyboardUrlRef(const std::string& keyset) override;
- bool IsEmojiHandwritingVoiceOnImeMenuEnabled() override;
// Sets an input method ID which will be returned by GetCurrentInputMethod().
void SetCurrentInputMethodId(const std::string& input_method_id);
@@ -135,10 +116,10 @@ class MockInputMethodManager : public InputMethodManager {
bool mod3_used_;
std::unique_ptr<ComponentExtensionIMEManager> comp_ime_manager_;
- DISALLOW_COPY_AND_ASSIGN(MockInputMethodManager);
+ DISALLOW_COPY_AND_ASSIGN(MockInputMethodManagerImpl);
};
} // namespace input_method
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_H_
+#endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_INPUT_METHOD_MANAGER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698