| 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 "chrome/browser/extensions/api/declarative_content/chrome_content_rules
_registry.h" | 5 #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules
_registry.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "chrome/browser/extensions/api/declarative_content/content_constants.h" | 11 #include "chrome/browser/extensions/api/declarative_content/content_constants.h" |
| 12 #include "chrome/browser/extensions/extension_util.h" | 12 #include "chrome/browser/extensions/extension_util.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "content/public/browser/navigation_details.h" | 16 #include "content/public/browser/navigation_details.h" |
| 17 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
| 18 #include "content/public/browser/notification_source.h" | 18 #include "content/public/browser/notification_source.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "extensions/browser/api/declarative/rules_registry_service.h" | 20 #include "extensions/browser/api/declarative/rules_registry_service.h" |
| 21 #include "extensions/browser/extension_registry.h" | 21 #include "extensions/browser/extension_registry.h" |
| 22 #include "extensions/browser/extension_system.h" | 22 #include "extensions/browser/extension_system.h" |
| 23 #include "extensions/common/extension_id.h" |
| 23 | 24 |
| 24 namespace extensions { | 25 namespace extensions { |
| 25 | 26 |
| 26 // | 27 // |
| 27 // EvaluationScope | 28 // EvaluationScope |
| 28 // | 29 // |
| 29 | 30 |
| 30 // Used to coalesce multiple requests for evaluation into a zero or one actual | 31 // Used to coalesce multiple requests for evaluation into a zero or one actual |
| 31 // evaluations (depending on the EvaluationDisposition). This is required for | 32 // evaluations (depending on the EvaluationDisposition). This is required for |
| 32 // correctness when multiple trackers respond to the same event. Otherwise, | 33 // correctness when multiple trackers respond to the same event. Otherwise, |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 size_t count = 0; | 423 size_t count = 0; |
| 423 for (const auto& web_contents_rules_pair : active_rules_) | 424 for (const auto& web_contents_rules_pair : active_rules_) |
| 424 count += web_contents_rules_pair.second.size(); | 425 count += web_contents_rules_pair.second.size(); |
| 425 return count; | 426 return count; |
| 426 } | 427 } |
| 427 | 428 |
| 428 ChromeContentRulesRegistry::~ChromeContentRulesRegistry() { | 429 ChromeContentRulesRegistry::~ChromeContentRulesRegistry() { |
| 429 } | 430 } |
| 430 | 431 |
| 431 } // namespace extensions | 432 } // namespace extensions |
| OLD | NEW |