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

Side by Side Diff: chrome/browser/chromeos/input_method/mock_ibus_controller.cc

Issue 9999018: chrome/browser/chromeos/input_method/ refactoring [part 6 of 6] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, remove preferences.h and language_preference.* from this CL Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/input_method/mock_ibus_controller.h"
6
7 #include "chrome/browser/chromeos/input_method/input_method_config.h"
8 #include "chrome/browser/chromeos/input_method/input_method_property.h"
9
10 namespace chromeos {
11 namespace input_method {
12
13 MockIBusController::MockIBusController()
14 : start_count_(0),
15 start_return_(true),
16 stop_count_(0),
17 stop_return_(true),
18 change_input_method_count_(0),
19 change_input_method_return_(true),
20 activate_input_method_property_count_(0),
21 activate_input_method_property_return_(true),
22 set_input_method_config_internal_count_(0),
23 set_input_method_config_internal_return_(true) {
24 }
25
26 MockIBusController::~MockIBusController() {
27 }
28
29 bool MockIBusController::Start(const std::vector<std::string>& ids) {
30 ++start_count_;
31 start_ids_ = ids;
32 return start_return_;
33 }
34
35 bool MockIBusController::Stop() {
36 ++stop_count_;
37 return stop_return_;
38 }
39
40 bool MockIBusController::ChangeInputMethod(const std::string& id) {
41 ++change_input_method_count_;
42 change_input_method_id_ = id;
43
44 // Emulate IBusController's behavior.
45 current_property_list_.clear();
46 NotifyPropertyChangedForTesting();
47
48 return change_input_method_return_;
49 }
50
51 bool MockIBusController::ActivateInputMethodProperty(const std::string& key) {
52 ++activate_input_method_property_count_;
53 activate_input_method_property_key_ = key;
54 return activate_input_method_property_return_;
55 }
56
57 bool MockIBusController::SetInputMethodConfigInternal(
58 const ConfigKeyType& key,
59 const InputMethodConfigValue& value) {
60 ++set_input_method_config_internal_count_;
61 set_input_method_config_internal_key_ = key;
62 set_input_method_config_internal_value_ = value;
63 return set_input_method_config_internal_return_;
64 }
65
66 } // namespace input_method
67 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698