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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H_ |
7 | 7 |
| 8 #include <map> |
8 #include <set> | 9 #include <set> |
9 #include <string> | 10 #include <string> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/values.h" |
15 #include "components/url_matcher/url_matcher.h" | 17 #include "components/url_matcher/url_matcher.h" |
16 #include "extensions/browser/api/declarative/declarative_rule.h" | 18 #include "extensions/browser/api/declarative/declarative_rule.h" |
17 | 19 |
18 namespace base { | |
19 class Value; | |
20 } | |
21 | |
22 namespace extensions { | 20 namespace extensions { |
23 | 21 |
24 class Extension; | |
25 | |
26 struct RendererContentMatchData { | 22 struct RendererContentMatchData { |
27 RendererContentMatchData(); | 23 RendererContentMatchData(); |
28 ~RendererContentMatchData(); | 24 ~RendererContentMatchData(); |
29 // Match IDs for the URL of the top-level page the renderer is | 25 // Match IDs for the URL of the top-level page the renderer is |
30 // returning data for. | 26 // returning data for. |
31 std::set<url_matcher::URLMatcherConditionSet::ID> page_url_matches; | 27 std::set<url_matcher::URLMatcherConditionSet::ID> page_url_matches; |
32 // All watched CSS selectors that match on frames with the same | 28 // All watched CSS selectors that match on frames with the same |
33 // origin as the page's main frame. | 29 // origin as the page's main frame. |
34 base::hash_set<std::string> css_selectors; | 30 base::hash_set<std::string> css_selectors; |
35 }; | 31 }; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 std::vector<std::string> css_selectors_; | 103 std::vector<std::string> css_selectors_; |
108 | 104 |
109 DISALLOW_COPY_AND_ASSIGN(ContentCondition); | 105 DISALLOW_COPY_AND_ASSIGN(ContentCondition); |
110 }; | 106 }; |
111 | 107 |
112 typedef DeclarativeConditionSet<ContentCondition> ContentConditionSet; | 108 typedef DeclarativeConditionSet<ContentCondition> ContentConditionSet; |
113 | 109 |
114 } // namespace extensions | 110 } // namespace extensions |
115 | 111 |
116 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H
_ | 112 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H
_ |
OLD | NEW |