| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/profile.h" | 23 #include "chrome/browser/profile.h" |
| 24 #include "chrome/browser/profile_manager.h" | 24 #include "chrome/browser/profile_manager.h" |
| 25 #include "chrome/browser/renderer_host/render_process_host.h" | 25 #include "chrome/browser/renderer_host/render_process_host.h" |
| 26 #include "chrome/browser/renderer_host/render_view_host.h" | 26 #include "chrome/browser/renderer_host/render_view_host.h" |
| 27 #include "chrome/common/jstemplate_builder.h" | 27 #include "chrome/common/jstemplate_builder.h" |
| 28 #include "chrome/common/l10n_util.h" | 28 #include "chrome/common/l10n_util.h" |
| 29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "chrome/common/pref_service.h" | 30 #include "chrome/common/pref_service.h" |
| 31 #include "chrome/common/render_messages.h" | 31 #include "chrome/common/render_messages.h" |
| 32 #include "chrome/common/resource_bundle.h" | 32 #include "chrome/common/resource_bundle.h" |
| 33 #include "chrome/common/url_constants.h" |
| 33 #include "chrome/renderer/about_handler.h" | 34 #include "chrome/renderer/about_handler.h" |
| 34 #include "googleurl/src/gurl.h" | 35 #include "googleurl/src/gurl.h" |
| 35 #include "grit/browser_resources.h" | 36 #include "grit/browser_resources.h" |
| 36 #include "grit/chromium_strings.h" | 37 #include "grit/chromium_strings.h" |
| 37 #include "grit/generated_resources.h" | 38 #include "grit/generated_resources.h" |
| 38 #include "grit/locale_settings.h" | 39 #include "grit/locale_settings.h" |
| 39 #include "webkit/glue/webkit_glue.h" | 40 #include "webkit/glue/webkit_glue.h" |
| 40 #ifdef CHROME_V8 | 41 #ifdef CHROME_V8 |
| 41 #include "v8/include/v8.h" | 42 #include "v8/include/v8.h" |
| 42 #endif | 43 #endif |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 229 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
| 229 NewRunnableMethod(&chrome_url_data_manager, | 230 NewRunnableMethod(&chrome_url_data_manager, |
| 230 &ChromeURLDataManager::AddDataSource, | 231 &ChromeURLDataManager::AddDataSource, |
| 231 about_source_)); | 232 about_source_)); |
| 232 initialized = true; | 233 initialized = true; |
| 233 } | 234 } |
| 234 } | 235 } |
| 235 | 236 |
| 236 bool BrowserAboutHandler::SupportsURL(GURL* url) { | 237 bool BrowserAboutHandler::SupportsURL(GURL* url) { |
| 237 // Enable this tab contents to access javascript urls. | 238 // Enable this tab contents to access javascript urls. |
| 238 if (url->SchemeIs("javascript")) | 239 if (url->SchemeIs(chrome::kJavaScriptScheme)) |
| 239 return true; | 240 return true; |
| 240 return WebContents::SupportsURL(url); | 241 return WebContents::SupportsURL(url); |
| 241 } | 242 } |
| 242 | 243 |
| 243 | 244 |
| 244 // static | 245 // static |
| 245 std::string BrowserAboutHandler::AboutVersion() { | 246 std::string BrowserAboutHandler::AboutVersion() { |
| 246 // Strings used in the JsTemplate file. | 247 // Strings used in the JsTemplate file. |
| 247 DictionaryValue localized_strings; | 248 DictionaryValue localized_strings; |
| 248 localized_strings.SetString(L"title", | 249 localized_strings.SetString(L"title", |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 | 615 |
| 615 AboutSource* about_source = static_cast<AboutSource*>(source_); | 616 AboutSource* about_source = static_cast<AboutSource*>(source_); |
| 616 about_source->FinishDataRequest(template_html, request_id_); | 617 about_source->FinishDataRequest(template_html, request_id_); |
| 617 } | 618 } |
| 618 | 619 |
| 619 // static | 620 // static |
| 620 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) { | 621 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) { |
| 621 // The AboutMemoryHandler cleans itself up. | 622 // The AboutMemoryHandler cleans itself up. |
| 622 new AboutMemoryHandler(source, request_id); | 623 new AboutMemoryHandler(source, request_id); |
| 623 } | 624 } |
| OLD | NEW |