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

Side by Side Diff: chrome/browser/chromeos/cros/fake/fake_input_method_library.h

Issue 2847072: Green Tree Tactical Force: Revert skrul's bad commits (probably a git-cl bug). (Closed)
Patch Set: Created 10 years, 5 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) 2010 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 CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_INPUT_METHOD_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_INPUT_METHOD_LIBRARY_H_
7
8 #include <string>
9
10 #include "base/scoped_ptr.h"
11 #include "chrome/browser/chromeos/cros/input_method_library.h"
12 #include "third_party/cros/chromeos_input_method.h"
13
14 namespace chromeos {
15
16 class FakeInputMethodLibrary : public InputMethodLibrary {
17 public:
18 FakeInputMethodLibrary()
19 : previous_input_method_("", "", "", ""),
20 current_input_method_("", "", "", "") {
21 }
22
23 virtual ~FakeInputMethodLibrary() {}
24 virtual void AddObserver(Observer* observer) {}
25 virtual void RemoveObserver(Observer* observer) {}
26 virtual InputMethodDescriptors* GetActiveInputMethods() {
27 return CreateFallbackInputMethodDescriptors();
28 }
29 virtual size_t GetNumActiveInputMethods() {
30 scoped_ptr<InputMethodDescriptors> input_methods(GetActiveInputMethods());
31 return input_methods->size();
32 }
33 virtual InputMethodDescriptors* GetSupportedInputMethods() {
34 return CreateFallbackInputMethodDescriptors();
35 }
36 virtual void ChangeInputMethod(const std::string& input_method_id) {}
37 virtual void SetImePropertyActivated(const std::string& key,
38 bool activated) {}
39 virtual bool InputMethodIsActivated(const std::string& input_method_id) {
40 return true;
41 }
42 virtual bool GetImeConfig(
43 const char* section, const char* config_name, ImeConfigValue* out_value) {
44 return true;
45 }
46 virtual bool SetImeConfig(const char* section,
47 const char* config_name,
48 const ImeConfigValue& value) {
49 return true;
50 }
51
52 virtual const InputMethodDescriptor& previous_input_method() const {
53 return previous_input_method_;
54 }
55 virtual const InputMethodDescriptor& current_input_method() const {
56 return current_input_method_;
57 }
58
59 virtual const ImePropertyList& current_ime_properties() const {
60 return current_ime_properties_;
61 }
62
63 private:
64 InputMethodDescriptor previous_input_method_;
65 InputMethodDescriptor current_input_method_;
66 ImePropertyList current_ime_properties_;
67 };
68
69 } // namespace chromeos
70
71 #endif // CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_INPUT_METHOD_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/fake/fake_cryptohome_library.h ('k') | chrome/browser/chromeos/cros/fake/fake_keyboard_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698