OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "extensions/browser/api/declarative/declarative_api.h" | 5 #include "extensions/browser/api/declarative/declarative_api.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/task_runner_util.h" | 11 #include "base/task_runner_util.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
15 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "extensions/browser/api/declarative/rules_registry_service.h" | 17 #include "extensions/browser/api/declarative/rules_registry_service.h" |
18 #include "extensions/browser/api/extensions_api_client.h" | 18 #include "extensions/browser/api/extensions_api_client.h" |
19 #include "extensions/browser/extension_system.h" | 19 #include "extensions/browser/extension_system.h" |
20 #include "extensions/browser/guest_view/web_view/web_view_constants.h" | 20 #include "extensions/browser/guest_view/web_view/web_view_constants.h" |
21 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 21 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
22 #include "extensions/common/api/events.h" | 22 #include "extensions/common/api/events.h" |
23 #include "extensions/common/extension_api.h" | 23 #include "extensions/common/extension_api.h" |
24 #include "extensions/common/permissions/permissions_data.h" | 24 #include "extensions/common/permissions/permissions_data.h" |
25 | 25 |
26 using extensions::core_api::events::Rule; | 26 using extensions::api::events::Rule; |
27 | 27 |
28 namespace AddRules = extensions::core_api::events::Event::AddRules; | 28 namespace AddRules = extensions::api::events::Event::AddRules; |
29 namespace GetRules = extensions::core_api::events::Event::GetRules; | 29 namespace GetRules = extensions::api::events::Event::GetRules; |
30 namespace RemoveRules = extensions::core_api::events::Event::RemoveRules; | 30 namespace RemoveRules = extensions::api::events::Event::RemoveRules; |
31 | |
32 | 31 |
33 namespace extensions { | 32 namespace extensions { |
34 | 33 |
35 namespace { | 34 namespace { |
36 | 35 |
37 const char kDeclarativeEventPrefix[] = "declarative"; | 36 const char kDeclarativeEventPrefix[] = "declarative"; |
38 | 37 |
39 void ConvertBinaryDictionaryValuesToBase64(base::DictionaryValue* dict); | 38 void ConvertBinaryDictionaryValuesToBase64(base::DictionaryValue* dict); |
40 | 39 |
41 // Encodes |binary| as base64 and returns a new StringValue populated with the | 40 // Encodes |binary| as base64 and returns a new StringValue populated with the |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 } else { | 202 } else { |
204 rules_registry_->GetAllRules(extension_id(), &rules); | 203 rules_registry_->GetAllRules(extension_id(), &rules); |
205 } | 204 } |
206 | 205 |
207 results_ = GetRules::Results::Create(rules); | 206 results_ = GetRules::Results::Create(rules); |
208 | 207 |
209 return true; | 208 return true; |
210 } | 209 } |
211 | 210 |
212 } // namespace extensions | 211 } // namespace extensions |
OLD | NEW |