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