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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 HelpHandler::~HelpHandler() { | 142 HelpHandler::~HelpHandler() { |
143 } | 143 } |
144 | 144 |
145 void HelpHandler::GetLocalizedValues(content::WebUIDataSource* source) { | 145 void HelpHandler::GetLocalizedValues(content::WebUIDataSource* source) { |
146 struct L10nResources { | 146 struct L10nResources { |
147 const char* name; | 147 const char* name; |
148 int ids; | 148 int ids; |
149 }; | 149 }; |
150 | 150 |
151 static L10nResources resources[] = { | 151 static L10nResources resources[] = { |
152 { "helpTitle", IDS_HELP_TITLE }, | 152 { "aboutTitle", IDS_ABOUT_TITLE }, |
153 { "aboutTitle", IDS_ABOUT_TAB_TITLE }, | |
154 #if defined(OS_CHROMEOS) | 153 #if defined(OS_CHROMEOS) |
155 { "aboutProductTitle", IDS_PRODUCT_OS_NAME }, | 154 { "aboutProductTitle", IDS_PRODUCT_OS_NAME }, |
156 #else | 155 #else |
157 { "aboutProductTitle", IDS_PRODUCT_NAME }, | 156 { "aboutProductTitle", IDS_PRODUCT_NAME }, |
158 #endif | 157 #endif |
159 { "aboutProductDescription", IDS_ABOUT_PRODUCT_DESCRIPTION }, | 158 { "aboutProductDescription", IDS_ABOUT_PRODUCT_DESCRIPTION }, |
160 { "relaunch", IDS_RELAUNCH_BUTTON }, | 159 { "relaunch", IDS_RELAUNCH_BUTTON }, |
161 #if defined(OS_CHROMEOS) | 160 #if defined(OS_CHROMEOS) |
162 { "relaunchAndPowerwash", IDS_RELAUNCH_AND_POWERWASH_BUTTON }, | 161 { "relaunchAndPowerwash", IDS_RELAUNCH_AND_POWERWASH_BUTTON }, |
163 #endif | 162 #endif |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 web_ui()->CallJavascriptFunction( | 545 web_ui()->CallJavascriptFunction( |
547 "help.HelpPage.updateCurrentChannel", base::StringValue(channel)); | 546 "help.HelpPage.updateCurrentChannel", base::StringValue(channel)); |
548 } | 547 } |
549 | 548 |
550 void HelpHandler::OnTargetChannel(const std::string& channel) { | 549 void HelpHandler::OnTargetChannel(const std::string& channel) { |
551 web_ui()->CallJavascriptFunction( | 550 web_ui()->CallJavascriptFunction( |
552 "help.HelpPage.updateTargetChannel", base::StringValue(channel)); | 551 "help.HelpPage.updateTargetChannel", base::StringValue(channel)); |
553 } | 552 } |
554 | 553 |
555 #endif // defined(OS_CHROMEOS) | 554 #endif // defined(OS_CHROMEOS) |
OLD | NEW |