OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/status/input_method_menu_button.h" | 5 #include "chrome/browser/chromeos/status/input_method_menu_button.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "chrome/browser/chromeos/cros/keyboard_library.h" | 12 #include "chrome/browser/chromeos/cros/keyboard_library.h" |
13 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 13 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
14 #include "chrome/browser/chromeos/status/status_area_host.h" | 14 #include "chrome/browser/chromeos/status/status_area_host.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Returns PrefService object associated with |host|. Returns NULL if we are NOT | 20 // Returns PrefService object associated with |host|. Returns NULL if we are NOT |
21 // within a browser. | 21 // within a browser. |
22 PrefService* GetPrefService(chromeos::StatusAreaHost* host) { | 22 PrefService* GetPrefService(chromeos::StatusAreaHost* host) { |
23 if (host->GetProfile()) { | 23 if (host->GetProfile()) { |
24 return host->GetProfile()->GetPrefs(); | 24 return host->GetProfile()->GetPrefs(); |
25 } | 25 } |
26 return NULL; | 26 return NULL; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 void InputMethodMenuButton::OpenConfigUI() { | 128 void InputMethodMenuButton::OpenConfigUI() { |
129 host_->OpenButtonOptions(this); // ask browser to open the DOMUI page. | 129 host_->OpenButtonOptions(this); // ask browser to open the DOMUI page. |
130 } | 130 } |
131 | 131 |
132 bool InputMethodMenuButton::ShouldSupportConfigUI() { | 132 bool InputMethodMenuButton::ShouldSupportConfigUI() { |
133 return host_->ShouldOpenButtonOptions(this); | 133 return host_->ShouldOpenButtonOptions(this); |
134 } | 134 } |
135 | 135 |
136 } // namespace chromeos | 136 } // namespace chromeos |
OLD | NEW |