OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings_private/settings_private_event_
router.h" | 5 #include "chrome/browser/extensions/api/settings_private/settings_private_event_
router.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 api::settings_private::PrefObject* pref_object = | 132 api::settings_private::PrefObject* pref_object = |
133 prefs_util_->GetPref(pref_name).release(); | 133 prefs_util_->GetPref(pref_name).release(); |
134 | 134 |
135 std::vector<linked_ptr<api::settings_private::PrefObject>> prefs; | 135 std::vector<linked_ptr<api::settings_private::PrefObject>> prefs; |
136 prefs.push_back(linked_ptr<api::settings_private::PrefObject>(pref_object)); | 136 prefs.push_back(linked_ptr<api::settings_private::PrefObject>(pref_object)); |
137 | 137 |
138 scoped_ptr<base::ListValue> args( | 138 scoped_ptr<base::ListValue> args( |
139 api::settings_private::OnPrefsChanged::Create(prefs)); | 139 api::settings_private::OnPrefsChanged::Create(prefs)); |
140 | 140 |
141 scoped_ptr<Event> extension_event(new Event( | 141 scoped_ptr<Event> extension_event(new Event( |
142 api::settings_private::OnPrefsChanged::kEventName, args.Pass())); | 142 events::UNKNOWN, api::settings_private::OnPrefsChanged::kEventName, |
| 143 args.Pass())); |
143 event_router->BroadcastEvent(extension_event.Pass()); | 144 event_router->BroadcastEvent(extension_event.Pass()); |
144 } | 145 } |
145 | 146 |
146 SettingsPrivateEventRouter* SettingsPrivateEventRouter::Create( | 147 SettingsPrivateEventRouter* SettingsPrivateEventRouter::Create( |
147 content::BrowserContext* context) { | 148 content::BrowserContext* context) { |
148 return new SettingsPrivateEventRouter(context); | 149 return new SettingsPrivateEventRouter(context); |
149 } | 150 } |
150 | 151 |
151 } // namespace extensions | 152 } // namespace extensions |
OLD | NEW |