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, | |
139 const Extension* extension, | 138 const Extension* extension, |
140 const base::Value& json_action, | 139 const base::Value& json_action, |
141 std::string* error, | 140 std::string* error, |
142 bool* bad_message); | 141 bool* bad_message); |
143 | 142 |
144 // Returns a description of the modification to the request caused by | 143 // Returns a description of the modification to the request caused by |
145 // this action. | 144 // this action. |
146 virtual LinkedPtrEventResponseDelta CreateDelta( | 145 virtual LinkedPtrEventResponseDelta CreateDelta( |
147 const WebRequestData& request_data, | 146 const WebRequestData& request_data, |
148 const std::string& extension_id, | 147 const std::string& extension_id, |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 private: | 461 private: |
463 ~WebRequestSendMessageToExtensionAction() override; | 462 ~WebRequestSendMessageToExtensionAction() override; |
464 | 463 |
465 std::string message_; | 464 std::string message_; |
466 DISALLOW_COPY_AND_ASSIGN(WebRequestSendMessageToExtensionAction); | 465 DISALLOW_COPY_AND_ASSIGN(WebRequestSendMessageToExtensionAction); |
467 }; | 466 }; |
468 | 467 |
469 } // namespace extensions | 468 } // namespace extensions |
470 | 469 |
471 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ | 470 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_ACTION_H_ |
OLD | NEW |