OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXECUTE_CODE_FUNCTION_IMPL_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ |
6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ | 6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ |
7 | 7 |
8 #include "extensions/browser/api/execute_code_function.h" | 8 #include "extensions/browser/api/execute_code_function.h" |
9 | 9 |
10 #include "extensions/browser/component_extension_resource_manager.h" | 10 #include "extensions/browser/component_extension_resource_manager.h" |
11 #include "extensions/browser/extensions_browser_client.h" | 11 #include "extensions/browser/extensions_browser_client.h" |
12 #include "extensions/browser/file_reader.h" | 12 #include "extensions/browser/file_reader.h" |
13 #include "extensions/common/error_utils.h" | 13 #include "extensions/common/error_utils.h" |
14 #include "extensions/common/extension_messages.h" | 14 #include "extensions/common/extension_messages.h" |
15 #include "extensions/common/file_util.h" | 15 #include "extensions/common/file_util.h" |
16 #include "extensions/common/manifest_constants.h" | 16 #include "extensions/common/manifest_constants.h" |
17 #include "extensions/common/message_bundle.h" | 17 #include "extensions/common/message_bundle.h" |
18 #include "net/base/filename_util.h" | 18 #include "net/base/filename_util.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Error messages | 23 // Error messages |
24 const char kNoCodeOrFileToExecuteError[] = "No source code or file specified."; | 24 const char kNoCodeOrFileToExecuteError[] = "No source code or file specified."; |
25 const char kMoreThanOneValuesError[] = | 25 const char kMoreThanOneValuesError[] = |
26 "Code and file should not be specified " | 26 "Code and file should not be specified " |
27 "at the same time in the second argument."; | 27 "at the same time in the second argument."; |
28 const char kLoadFileError[] = "Failed to load file: \"*\". "; | 28 const char kLoadFileError[] = "Failed to load file: \"*\". "; |
29 | |
Fady Samuel
2014/09/08 14:54:52
Undo this change.
| |
30 } | 29 } |
31 | 30 |
32 namespace extensions { | 31 namespace extensions { |
33 | 32 |
34 using core_api::extension_types::InjectDetails; | 33 using core_api::extension_types::InjectDetails; |
35 | 34 |
36 ExecuteCodeFunction::ExecuteCodeFunction() { | 35 ExecuteCodeFunction::ExecuteCodeFunction() { |
37 } | 36 } |
38 | 37 |
39 ExecuteCodeFunction::~ExecuteCodeFunction() { | 38 ExecuteCodeFunction::~ExecuteCodeFunction() { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
227 const base::ListValue& result) { | 226 const base::ListValue& result) { |
228 if (!error.empty()) | 227 if (!error.empty()) |
229 SetError(error); | 228 SetError(error); |
230 | 229 |
231 SendResponse(error.empty()); | 230 SendResponse(error.empty()); |
232 } | 231 } |
233 | 232 |
234 } // namespace extensions | 233 } // namespace extensions |
235 | 234 |
236 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ | 235 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ |
OLD | NEW |