OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/api/preference/chrome_direct_setting_api.h" | 5 #include "chrome/browser/extensions/api/preference/chrome_direct_setting_api.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "chrome/browser/extensions/api/preference/preference_api_constants.h" | 13 #include "chrome/browser/extensions/api/preference/preference_api_constants.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "extensions/browser/extension_system.h" |
16 | 17 |
17 namespace extensions { | 18 namespace extensions { |
18 namespace chromedirectsetting { | 19 namespace chromedirectsetting { |
19 | 20 |
20 const char kOnPrefChangeFormat[] = | 21 const char kOnPrefChangeFormat[] = |
21 "types.private.ChromeDirectSetting.%s.onChange"; | 22 "types.private.ChromeDirectSetting.%s.onChange"; |
22 | 23 |
23 class PreferenceWhitelist { | 24 class PreferenceWhitelist { |
24 public: | 25 public: |
25 PreferenceWhitelist() { | 26 PreferenceWhitelist() { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 scoped_ptr<Event> event(new Event(event_name, args_copy.Pass())); | 145 scoped_ptr<Event> event(new Event(event_name, args_copy.Pass())); |
145 router->DispatchEventToExtension(extension_id, event.Pass()); | 146 router->DispatchEventToExtension(extension_id, event.Pass()); |
146 } | 147 } |
147 } | 148 } |
148 } | 149 } |
149 } | 150 } |
150 } | 151 } |
151 | 152 |
152 } // namespace chromedirectsetting | 153 } // namespace chromedirectsetting |
153 } // namespace extensions | 154 } // namespace extensions |
154 | |
OLD | NEW |