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_WEBREQUEST_WEBREQUEST_CONDITIO
N_ATTRIBUTE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_CONDITIO
N_ATTRIBUTE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_CONDITIO
N_ATTRIBUTE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_CONDITIO
N_ATTRIBUTE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "chrome/browser/extensions/api/declarative_webrequest/request_stage.h" | 14 #include "chrome/browser/extensions/api/declarative_webrequest/request_stage.h" |
15 #include "chrome/common/extensions/api/events.h" | 15 #include "chrome/common/extensions/api/events.h" |
16 #include "webkit/common/resource_type.h" | 16 #include "content/public/common/resource_type.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class Value; | 19 class Value; |
20 } | 20 } |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 class URLRequest; | 23 class URLRequest; |
24 } | 24 } |
25 | 25 |
26 namespace extensions { | 26 namespace extensions { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Implementation of WebRequestConditionAttribute: | 98 // Implementation of WebRequestConditionAttribute: |
99 virtual int GetStages() const OVERRIDE; | 99 virtual int GetStages() const OVERRIDE; |
100 virtual bool IsFulfilled( | 100 virtual bool IsFulfilled( |
101 const WebRequestData& request_data) const OVERRIDE; | 101 const WebRequestData& request_data) const OVERRIDE; |
102 virtual Type GetType() const OVERRIDE; | 102 virtual Type GetType() const OVERRIDE; |
103 virtual std::string GetName() const OVERRIDE; | 103 virtual std::string GetName() const OVERRIDE; |
104 virtual bool Equals(const WebRequestConditionAttribute* other) const OVERRIDE; | 104 virtual bool Equals(const WebRequestConditionAttribute* other) const OVERRIDE; |
105 | 105 |
106 private: | 106 private: |
107 explicit WebRequestConditionAttributeResourceType( | 107 explicit WebRequestConditionAttributeResourceType( |
108 const std::vector<ResourceType::Type>& types); | 108 const std::vector<content::ResourceType::Type>& types); |
109 virtual ~WebRequestConditionAttributeResourceType(); | 109 virtual ~WebRequestConditionAttributeResourceType(); |
110 | 110 |
111 const std::vector<ResourceType::Type> types_; | 111 const std::vector<content::ResourceType::Type> types_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(WebRequestConditionAttributeResourceType); | 113 DISALLOW_COPY_AND_ASSIGN(WebRequestConditionAttributeResourceType); |
114 }; | 114 }; |
115 | 115 |
116 // Condition that checks whether a response's Content-Type header has a | 116 // Condition that checks whether a response's Content-Type header has a |
117 // certain MIME media type. | 117 // certain MIME media type. |
118 class WebRequestConditionAttributeContentType | 118 class WebRequestConditionAttributeContentType |
119 : public WebRequestConditionAttribute { | 119 : public WebRequestConditionAttribute { |
120 public: | 120 public: |
121 // Factory method, see WebRequestConditionAttribute::Create. | 121 // Factory method, see WebRequestConditionAttribute::Create. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 virtual ~WebRequestConditionAttributeStages(); | 266 virtual ~WebRequestConditionAttributeStages(); |
267 | 267 |
268 const int allowed_stages_; // Composition of RequestStage values. | 268 const int allowed_stages_; // Composition of RequestStage values. |
269 | 269 |
270 DISALLOW_COPY_AND_ASSIGN(WebRequestConditionAttributeStages); | 270 DISALLOW_COPY_AND_ASSIGN(WebRequestConditionAttributeStages); |
271 }; | 271 }; |
272 | 272 |
273 } // namespace extensions | 273 } // namespace extensions |
274 | 274 |
275 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_CONDI
TION_ATTRIBUTE_H_ | 275 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_CONDI
TION_ATTRIBUTE_H_ |
OLD | NEW |