| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 DCHECK(args->empty()); | 297 DCHECK(args->empty()); |
| 298 Browser* browser = browser::FindBrowserWithWebContents( | 298 Browser* browser = browser::FindBrowserWithWebContents( |
| 299 web_ui()->GetWebContents()); | 299 web_ui()->GetWebContents()); |
| 300 browser->OpenFeedbackDialog(); | 300 browser->OpenFeedbackDialog(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 void HelpHandler::OpenHelpPage(const base::ListValue* args) { | 303 void HelpHandler::OpenHelpPage(const base::ListValue* args) { |
| 304 DCHECK(args->empty()); | 304 DCHECK(args->empty()); |
| 305 Browser* browser = browser::FindBrowserWithWebContents( | 305 Browser* browser = browser::FindBrowserWithWebContents( |
| 306 web_ui()->GetWebContents()); | 306 web_ui()->GetWebContents()); |
| 307 browser->ShowHelpTab(); | 307 browser->ShowHelpTab(Browser::HELP_SOURCE_WEBUI); |
| 308 } | 308 } |
| 309 | 309 |
| 310 #if defined(OS_CHROMEOS) | 310 #if defined(OS_CHROMEOS) |
| 311 | 311 |
| 312 void HelpHandler::SetReleaseTrack(const ListValue* args) { | 312 void HelpHandler::SetReleaseTrack(const ListValue* args) { |
| 313 if (!CanChangeReleaseChannel()) { | 313 if (!CanChangeReleaseChannel()) { |
| 314 LOG(WARNING) << "Non-owner tried to change release track."; | 314 LOG(WARNING) << "Non-owner tried to change release track."; |
| 315 return; | 315 return; |
| 316 } | 316 } |
| 317 | 317 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 431 |
| 432 // Note that this string will be internationalized. | 432 // Note that this string will be internationalized. |
| 433 string16 last_updated = base::TimeFormatFriendlyDate(time); | 433 string16 last_updated = base::TimeFormatFriendlyDate(time); |
| 434 g_last_updated_string = Value::CreateStringValue(last_updated); | 434 g_last_updated_string = Value::CreateStringValue(last_updated); |
| 435 } | 435 } |
| 436 | 436 |
| 437 web_ui()->CallJavascriptFunction("help.HelpPage.setLastUpdated", | 437 web_ui()->CallJavascriptFunction("help.HelpPage.setLastUpdated", |
| 438 *g_last_updated_string); | 438 *g_last_updated_string); |
| 439 } | 439 } |
| 440 #endif // defined(OS_CHROMEOS) | 440 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |