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 #include "chrome/browser/ui/webui/help/help_handler.h" | 5 #include "chrome/browser/ui/webui/help/help_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/ui/browser_finder.h" | 22 #include "chrome/browser/ui/browser_finder.h" |
23 #include "chrome/browser/ui/chrome_pages.h" | 23 #include "chrome/browser/ui/chrome_pages.h" |
24 #include "chrome/common/chrome_content_client.h" | 24 #include "chrome/common/chrome_content_client.h" |
25 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
30 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
31 #include "content/public/browser/web_ui_data_source.h" | 31 #include "content/public/browser/web_ui_data_source.h" |
| 32 #include "content/public/common/user_agent.h" |
32 #include "grit/chromium_strings.h" | 33 #include "grit/chromium_strings.h" |
33 #include "grit/generated_resources.h" | 34 #include "grit/generated_resources.h" |
34 #include "grit/google_chrome_strings.h" | 35 #include "grit/google_chrome_strings.h" |
35 #include "ui/base/l10n/l10n_util.h" | 36 #include "ui/base/l10n/l10n_util.h" |
36 #include "ui/base/resource/resource_bundle.h" | 37 #include "ui/base/resource/resource_bundle.h" |
37 #include "v8/include/v8.h" | 38 #include "v8/include/v8.h" |
38 #include "webkit/common/user_agent/user_agent_util.h" | |
39 | 39 |
40 #if defined(OS_MACOSX) | 40 #if defined(OS_MACOSX) |
41 #include "chrome/browser/mac/obsolete_system.h" | 41 #include "chrome/browser/mac/obsolete_system.h" |
42 #endif | 42 #endif |
43 | 43 |
44 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
45 #include "base/files/file_util_proxy.h" | 45 #include "base/files/file_util_proxy.h" |
46 #include "base/i18n/time_formatting.h" | 46 #include "base/i18n/time_formatting.h" |
47 #include "base/prefs/pref_service.h" | 47 #include "base/prefs/pref_service.h" |
48 #include "base/sys_info.h" | 48 #include "base/sys_info.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 if (CommandLine::ForCurrentProcess()-> | 268 if (CommandLine::ForCurrentProcess()-> |
269 HasSwitch(chromeos::switches::kDisableNewChannelSwitcherUI)) { | 269 HasSwitch(chromeos::switches::kDisableNewChannelSwitcherUI)) { |
270 source->AddBoolean("disableNewChannelSwitcherUI", true); | 270 source->AddBoolean("disableNewChannelSwitcherUI", true); |
271 } | 271 } |
272 #endif | 272 #endif |
273 | 273 |
274 base::string16 tos = l10n_util::GetStringFUTF16( | 274 base::string16 tos = l10n_util::GetStringFUTF16( |
275 IDS_ABOUT_TERMS_OF_SERVICE, base::UTF8ToUTF16(chrome::kChromeUITermsURL)); | 275 IDS_ABOUT_TERMS_OF_SERVICE, base::UTF8ToUTF16(chrome::kChromeUITermsURL)); |
276 source->AddString("productTOS", tos); | 276 source->AddString("productTOS", tos); |
277 | 277 |
278 source->AddString("webkitVersion", webkit_glue::GetWebKitVersion()); | 278 source->AddString("webkitVersion", content::GetWebKitVersion()); |
279 | 279 |
280 source->AddString("jsEngine", "V8"); | 280 source->AddString("jsEngine", "V8"); |
281 source->AddString("jsEngineVersion", v8::V8::GetVersion()); | 281 source->AddString("jsEngineVersion", v8::V8::GetVersion()); |
282 | 282 |
283 source->AddString("userAgentInfo", GetUserAgent()); | 283 source->AddString("userAgentInfo", GetUserAgent()); |
284 | 284 |
285 CommandLine::StringType command_line = | 285 CommandLine::StringType command_line = |
286 CommandLine::ForCurrentProcess()->GetCommandLineString(); | 286 CommandLine::ForCurrentProcess()->GetCommandLineString(); |
287 source->AddString("commandLineInfo", command_line); | 287 source->AddString("commandLineInfo", command_line); |
288 } | 288 } |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 web_ui()->CallJavascriptFunction( | 546 web_ui()->CallJavascriptFunction( |
547 "help.HelpPage.updateCurrentChannel", base::StringValue(channel)); | 547 "help.HelpPage.updateCurrentChannel", base::StringValue(channel)); |
548 } | 548 } |
549 | 549 |
550 void HelpHandler::OnTargetChannel(const std::string& channel) { | 550 void HelpHandler::OnTargetChannel(const std::string& channel) { |
551 web_ui()->CallJavascriptFunction( | 551 web_ui()->CallJavascriptFunction( |
552 "help.HelpPage.updateTargetChannel", base::StringValue(channel)); | 552 "help.HelpPage.updateTargetChannel", base::StringValue(channel)); |
553 } | 553 } |
554 | 554 |
555 #endif // defined(OS_CHROMEOS) | 555 #endif // defined(OS_CHROMEOS) |
OLD | NEW |