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

Side by Side Diff: chrome/browser/chromeos/input_method/ibus_controller_base.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/ibus_controller_base.h"
6
7 namespace chromeos {
8 namespace input_method {
9
10 IBusControllerBase::IBusControllerBase() {
11 }
12
13 IBusControllerBase::~IBusControllerBase() {
14 }
15
16 void IBusControllerBase::AddObserver(Observer* observer) {
17 observers_.AddObserver(observer);
18 }
19
20 void IBusControllerBase::RemoveObserver(Observer* observer) {
21 observers_.RemoveObserver(observer);
22 }
23
24 bool IBusControllerBase::SetInputMethodConfig(
25 const std::string& section,
26 const std::string& config_name,
27 const InputMethodConfigValue& value) {
28 DCHECK(!section.empty());
29 DCHECK(!config_name.empty());
30
31 const ConfigKeyType key(section, config_name);
32 current_config_values_[key] = value;
33 return SetInputMethodConfigInternal(key, value);
34 }
35
36 const InputMethodPropertyList&
37 IBusControllerBase::GetCurrentProperties() const {
38 return current_property_list_;
39 }
40
41 bool IBusControllerBase::GetInputMethodConfigForTesting(
42 const std::string& section,
43 const std::string& config_name,
44 InputMethodConfigValue* out_value) {
45 DCHECK(out_value);
46 const ConfigKeyType key = std::make_pair(section, config_name);
47 InputMethodConfigRequests::const_iterator iter
48 = current_config_values_.find(key);
49 if (iter == current_config_values_.end())
50 return false;
51 *out_value = iter->second;
52 return true;
53 }
54
55 void IBusControllerBase::NotifyPropertyChangedForTesting() {
56 FOR_EACH_OBSERVER(Observer, observers_, PropertyChanged());
57 }
58
59 void IBusControllerBase::SetCurrentPropertiesForTesting(
60 const InputMethodPropertyList& current_property_list) {
61 current_property_list_ = current_property_list;
62 }
63
64 } // namespace input_method
65 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698