OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/webui/extensions/extension_error_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_error_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/devtools/devtools_window.h" | 14 #include "chrome/browser/devtools/devtools_window.h" |
15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
16 #include "chrome/browser/extensions/extension_system.h" | 16 #include "chrome/browser/extensions/extension_system.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_finder.h" | 19 #include "chrome/browser/ui/browser_finder.h" |
20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 20 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
21 #include "chrome/common/extensions/extension.h" | |
22 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
24 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
25 #include "content/public/browser/web_ui.h" | 24 #include "content/public/browser/web_ui.h" |
26 #include "content/public/browser/web_ui_data_source.h" | 25 #include "content/public/browser/web_ui_data_source.h" |
27 #include "extensions/browser/extension_error.h" | 26 #include "extensions/browser/extension_error.h" |
28 #include "extensions/browser/file_highlighter.h" | 27 #include "extensions/browser/file_highlighter.h" |
29 #include "extensions/common/constants.h" | 28 #include "extensions/common/constants.h" |
| 29 #include "extensions/common/extension.h" |
30 #include "grit/generated_resources.h" | 30 #include "grit/generated_resources.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 | 32 |
33 namespace extensions { | 33 namespace extensions { |
34 | 34 |
35 // Keys for objects passed to and from extension error UI. | 35 // Keys for objects passed to and from extension error UI. |
36 const char kPathSuffixKey[] = "pathSuffix"; | 36 const char kPathSuffixKey[] = "pathSuffix"; |
37 const char kTitleKey[] = "title"; | 37 const char kTitleKey[] = "title"; |
38 | 38 |
39 ExtensionErrorHandler::ExtensionErrorHandler(Profile* profile) | 39 ExtensionErrorHandler::ExtensionErrorHandler(Profile* profile) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 base::DictionaryValue* results, | 245 base::DictionaryValue* results, |
246 int line_number, | 246 int line_number, |
247 std::string* contents) { | 247 std::string* contents) { |
248 SourceHighlighter highlighter(*contents, line_number); | 248 SourceHighlighter highlighter(*contents, line_number); |
249 highlighter.SetHighlightedRegions(results); | 249 highlighter.SetHighlightedRegions(results); |
250 web_ui()->CallJavascriptFunction( | 250 web_ui()->CallJavascriptFunction( |
251 "extensions.ExtensionErrorOverlay.requestFileSourceResponse", *results); | 251 "extensions.ExtensionErrorOverlay.requestFileSourceResponse", *results); |
252 } | 252 } |
253 | 253 |
254 } // namespace extensions | 254 } // namespace extensions |
OLD | NEW |