Commit e6f95f35 authored by calamity@chromium.org's avatar calamity@chromium.org

Add help button to app launcher.

Goes to https://support.google.com/chrome/?p=cws_app_launcher.

BUG=225068

Review URL: https://chromiumcodereview.appspot.com/14007002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202740 0039d316-1c4b-4281-b951-d872f2087c98
parent b5a59119
......@@ -307,6 +307,10 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
// Nothing needs to be done.
}
virtual void OpenHelp() OVERRIDE {
// Nothing needs to be done.
}
virtual void OpenFeedback() OVERRIDE {
// Nothing needs to be done.
}
......
......@@ -17,6 +17,8 @@
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h"
#if defined(USE_ASH)
......@@ -134,6 +136,18 @@ void AppListViewDelegate::OpenSettings() {
controller_->ActivateApp(profile_, extension, 0);
}
void AppListViewDelegate::OpenHelp() {
chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow(
controller_->GetAppListWindow());
Browser* browser = chrome::FindOrCreateTabbedBrowser(
profile_, desktop);
browser->OpenURL(content::OpenURLParams(GURL(chrome::kAppLauncherHelpURL),
content::Referrer(),
NEW_FOREGROUND_TAB,
content::PAGE_TRANSITION_LINK,
false));
}
void AppListViewDelegate::OpenFeedback() {
chrome::HostDesktopType desktop = chrome::GetHostDesktopTypeForNativeWindow(
controller_->GetAppListWindow());
......
......@@ -54,6 +54,7 @@ class AppListViewDelegate : public app_list::AppListViewDelegate {
virtual string16 GetCurrentUserName() OVERRIDE;
virtual string16 GetCurrentUserEmail() OVERRIDE;
virtual void OpenSettings() OVERRIDE;
virtual void OpenHelp() OVERRIDE;
virtual void OpenFeedback() OVERRIDE;
scoped_ptr<app_list::SigninDelegate> signin_delegate_;
......
......@@ -459,6 +459,9 @@ const char kCloudPrintLearnMoreURL[] =
const char kInvalidPasswordHelpURL[] =
"https://support.google.com/accounts/bin/answer.py?ctx=ch&answer=27444";
const char kAppLauncherHelpURL[] =
"https://support.google.com/chrome_webstore/?p=cws_app_launcher";
const char kCanNotAccessAccountURL[] =
"https://support.google.com/accounts/bin/answer.py?answer=48598";
......
......@@ -374,6 +374,9 @@ extern const char kSyncEverythingLearnMoreURL[];
// The URL for information on how to recover your password.
extern const char kInvalidPasswordHelpURL[];
// The URL for information on how to use the app launcher.
extern const char kAppLauncherHelpURL[];
// The URL for information on what to do if you can't sign in to your Google
// account.
extern const char kCanNotAccessAccountURL[];
......
......@@ -27,6 +27,9 @@ void AppListMenu::InitMenu() {
menu_model_.AddItem(SHOW_SETTINGS, l10n_util::GetStringUTF16(
IDS_APP_LIST_OPEN_SETTINGS));
menu_model_.AddItem(SHOW_HELP, l10n_util::GetStringUTF16(
IDS_APP_LIST_HELP));
menu_model_.AddItem(SHOW_FEEDBACK, l10n_util::GetStringUTF16(
IDS_APP_LIST_OPEN_FEEDBACK));
}
......@@ -51,6 +54,9 @@ void AppListMenu::ExecuteCommand(int command_id, int event_flags) {
case SHOW_SETTINGS:
delegate_->OpenSettings();
break;
case SHOW_HELP:
delegate_->OpenHelp();
break;
case SHOW_FEEDBACK:
delegate_->OpenFeedback();
break;
......
......@@ -19,6 +19,7 @@ class AppListMenu : public ui::SimpleMenuModel::Delegate {
enum AppListMenuCommands {
CURRENT_USER,
SHOW_SETTINGS,
SHOW_HELP,
SHOW_FEEDBACK,
};
......
......@@ -74,6 +74,9 @@ class APP_LIST_EXPORT AppListViewDelegate {
// Open the settings UI.
virtual void OpenSettings() = 0;
// Open the help UI.
virtual void OpenHelp() = 0;
// Open the feedback UI.
virtual void OpenFeedback() = 0;
};
......
......@@ -40,6 +40,7 @@ class AppListTestViewDelegate : public AppListViewDelegate {
virtual string16 GetCurrentUserName() OVERRIDE;
virtual string16 GetCurrentUserEmail() OVERRIDE;
virtual void OpenSettings() OVERRIDE {}
virtual void OpenHelp() OVERRIDE {}
virtual void OpenFeedback() OVERRIDE {}
private:
......
......@@ -496,6 +496,9 @@ need to be translated for each locale.-->
</message>
<!-- App list -->
<message name="IDS_APP_LIST_HELP" desc="The menu entry to show the app list help UI.">
Help
</message>
<message name="IDS_APP_LIST_OPEN_SETTINGS" desc="The menu entry to show the settings UI.">
Settings
</message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment