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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 } | 294 } |
295 #endif | 295 #endif |
296 | 296 |
297 void HelpHandler::RelaunchNow(const ListValue* args) { | 297 void HelpHandler::RelaunchNow(const ListValue* args) { |
298 DCHECK(args->empty()); | 298 DCHECK(args->empty()); |
299 version_updater_->RelaunchBrowser(); | 299 version_updater_->RelaunchBrowser(); |
300 } | 300 } |
301 | 301 |
302 void HelpHandler::OpenFeedbackDialog(const ListValue* args) { | 302 void HelpHandler::OpenFeedbackDialog(const ListValue* args) { |
303 DCHECK(args->empty()); | 303 DCHECK(args->empty()); |
304 Browser* browser = browser::FindBrowserWithWebContents( | 304 Browser* browser = chrome::FindBrowserWithWebContents( |
305 web_ui()->GetWebContents()); | 305 web_ui()->GetWebContents()); |
306 chrome::OpenFeedbackDialog(browser); | 306 chrome::OpenFeedbackDialog(browser); |
307 } | 307 } |
308 | 308 |
309 void HelpHandler::OpenHelpPage(const base::ListValue* args) { | 309 void HelpHandler::OpenHelpPage(const base::ListValue* args) { |
310 DCHECK(args->empty()); | 310 DCHECK(args->empty()); |
311 Browser* browser = browser::FindBrowserWithWebContents( | 311 Browser* browser = chrome::FindBrowserWithWebContents( |
312 web_ui()->GetWebContents()); | 312 web_ui()->GetWebContents()); |
313 chrome::ShowHelp(browser, chrome::HELP_SOURCE_WEBUI); | 313 chrome::ShowHelp(browser, chrome::HELP_SOURCE_WEBUI); |
314 } | 314 } |
315 | 315 |
316 #if defined(OS_CHROMEOS) | 316 #if defined(OS_CHROMEOS) |
317 | 317 |
318 void HelpHandler::SetReleaseTrack(const ListValue* args) { | 318 void HelpHandler::SetReleaseTrack(const ListValue* args) { |
319 if (!CanChangeReleaseChannel()) { | 319 if (!CanChangeReleaseChannel()) { |
320 LOG(WARNING) << "Non-owner tried to change release track."; | 320 LOG(WARNING) << "Non-owner tried to change release track."; |
321 return; | 321 return; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 438 |
439 // Note that this string will be internationalized. | 439 // Note that this string will be internationalized. |
440 string16 build_date = base::TimeFormatFriendlyDate(time); | 440 string16 build_date = base::TimeFormatFriendlyDate(time); |
441 g_build_date_string = Value::CreateStringValue(build_date); | 441 g_build_date_string = Value::CreateStringValue(build_date); |
442 } | 442 } |
443 | 443 |
444 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", | 444 web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate", |
445 *g_build_date_string); | 445 *g_build_date_string); |
446 } | 446 } |
447 #endif // defined(OS_CHROMEOS) | 447 #endif // defined(OS_CHROMEOS) |
OLD | NEW |