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 EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ |
6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ | 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 bool crosses_incognito) const; | 128 bool crosses_incognito) const; |
129 | 129 |
130 // Factory method that instantiates a concrete WebRequestAction | 130 // Factory method that instantiates a concrete WebRequestAction |
131 // implementation according to |json_action|, the representation of the | 131 // implementation according to |json_action|, the representation of the |
132 // WebRequestAction as received from the extension API. | 132 // WebRequestAction as received from the extension API. |
133 // Sets |error| and returns NULL in case of a semantic error that cannot | 133 // Sets |error| and returns NULL in case of a semantic error that cannot |
134 // be caught by schema validation. Sets |bad_message| and returns NULL | 134 // be caught by schema validation. Sets |bad_message| and returns NULL |
135 // in case the input is syntactically unexpected. | 135 // in case the input is syntactically unexpected. |
136 static scoped_refptr<const WebRequestAction> Create( | 136 static scoped_refptr<const WebRequestAction> Create( |
137 content::BrowserContext* browser_context, | 137 content::BrowserContext* browser_context, |
| 138 const HostID& host_id, |
138 const Extension* extension, | 139 const Extension* extension, |
139 const base::Value& json_action, | 140 const base::Value& json_action, |
140 std::string* error, | 141 std::string* error, |
141 bool* bad_message); | 142 bool* bad_message); |
142 | 143 |
143 // Returns a description of the modification to the request caused by | 144 // Returns a description of the modification to the request caused by |
144 // this action. | 145 // this action. |
145 virtual LinkedPtrEventResponseDelta CreateDelta( | 146 virtual LinkedPtrEventResponseDelta CreateDelta( |
146 const WebRequestData& request_data, | 147 const WebRequestData& request_data, |
147 const std::string& extension_id, | 148 const std::string& extension_id, |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 private: | 462 private: |
462 ~WebRequestSendMessageToExtensionAction() override; | 463 ~WebRequestSendMessageToExtensionAction() override; |
463 | 464 |
464 std::string message_; | 465 std::string message_; |
465 DISALLOW_COPY_AND_ASSIGN(WebRequestSendMessageToExtensionAction); | 466 DISALLOW_COPY_AND_ASSIGN(WebRequestSendMessageToExtensionAction); |
466 }; | 467 }; |
467 | 468 |
468 } // namespace extensions | 469 } // namespace extensions |
469 | 470 |
470 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ | 471 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ |
OLD | NEW |