diff options
author | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-14 01:45:21 +0000 |
---|---|---|
committer | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-14 01:45:21 +0000 |
commit | f40dcd1ceab1a3dccd47b414128998a48a538173 (patch) | |
tree | 30889a809b50a8c47f6016a05ce94881aa55183e /chrome/browser/ui/browser_command_controller.cc | |
parent | a9dc5961ed428a02eacbfa6089c5334e3cfe773c (diff) | |
download | chromium_src-f40dcd1ceab1a3dccd47b414128998a48a538173.zip chromium_src-f40dcd1ceab1a3dccd47b414128998a48a538173.tar.gz chromium_src-f40dcd1ceab1a3dccd47b414128998a48a538173.tar.bz2 |
Create hosted apps from any website for streamlined hosted apps.
This CL replaces the "Create application shortcuts" button in
Wrench Menu > Tools with "Create app for this website" for the
streamlined hosted app experience.
Rather than creating shortcuts, this button creates a hosted
app that points to the website. From there, the user can right click
the hosted app and press "Create shortcuts" if they wish.
BUG=
Review URL: https://codereview.chromium.org/34533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_command_controller.cc')
-rw-r--r-- | chrome/browser/ui/browser_command_controller.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index 6682ab7..5f646f1 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc @@ -4,6 +4,7 @@ #include "chrome/browser/ui/browser_command_controller.h" +#include "base/command_line.h" #include "base/prefs/pref_service.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser_process.h" @@ -29,6 +30,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model_utils.h" #include "chrome/browser/ui/webui/inspect_ui.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/content_restriction.h" #include "chrome/common/pref_names.h" #include "chrome/common/profiling.h" @@ -655,6 +657,9 @@ void BrowserCommandController::ExecuteCommandWithDisposition( case IDC_CREATE_SHORTCUTS: CreateApplicationShortcuts(browser_); break; + case IDC_CREATE_HOSTED_APP: + CreateHostedAppFromCurrentWebContents(browser_); + break; case IDC_DEV_TOOLS: ToggleDevToolsWindow(browser_, DevToolsToggleAction::Show()); break; @@ -1093,6 +1098,9 @@ void BrowserCommandController::UpdateCommandsForTabState() { command_updater_.UpdateCommandEnabled( IDC_CREATE_SHORTCUTS, CanCreateApplicationShortcuts(browser_)); + command_updater_.UpdateCommandEnabled( + IDC_CREATE_HOSTED_APP, + CanCreateApplicationShortcuts(browser_)); #endif command_updater_.UpdateCommandEnabled( |