Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 2772713002: Remove IDC_CREATE_SHORTCUT and its associated UI. (Closed)
Patch Set: Fix compile Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index e7622b84c156f326d3d36f05ad09f9ad926f31ad..b2067a1f7064c515e4da477dcf1424365f7ecf18 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -1294,13 +1294,6 @@ bool CanViewSource(const Browser* browser) {
}
#if BUILDFLAG(ENABLE_EXTENSIONS)
-void CreateApplicationShortcuts(Browser* browser) {
- base::RecordAction(UserMetricsAction("CreateShortcut"));
- extensions::TabHelper::FromWebContents(
- browser->tab_strip_model()->GetActiveWebContents())->
- CreateApplicationShortcuts();
-}
-
void CreateBookmarkAppFromCurrentWebContents(Browser* browser) {
base::RecordAction(UserMetricsAction("CreateHostedApp"));
extensions::TabHelper::FromWebContents(
@@ -1308,36 +1301,11 @@ void CreateBookmarkAppFromCurrentWebContents(Browser* browser) {
CreateHostedAppFromWebContents();
}
-bool CanCreateApplicationShortcuts(const Browser* browser) {
- return extensions::TabHelper::FromWebContents(
- browser->tab_strip_model()->GetActiveWebContents())->
- CanCreateApplicationShortcuts();
-}
-
bool CanCreateBookmarkApp(const Browser* browser) {
return extensions::TabHelper::FromWebContents(
browser->tab_strip_model()->GetActiveWebContents())
->CanCreateBookmarkApp();
}
-
-void ConvertTabToAppWindow(Browser* browser,
- content::WebContents* contents) {
- const GURL& url = contents->GetController().GetLastCommittedEntry()->GetURL();
- std::string app_name = web_app::GenerateApplicationNameFromURL(url);
-
- int index = browser->tab_strip_model()->GetIndexOfWebContents(contents);
- if (index >= 0)
- browser->tab_strip_model()->DetachWebContentsAt(index);
-
- Browser* app_browser = new Browser(Browser::CreateParams::CreateForApp(
- app_name, true /* trusted_source */, gfx::Rect(), browser->profile(),
- true));
- app_browser->tab_strip_model()->AppendWebContents(contents, true);
-
- contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
- contents->GetRenderViewHost()->SyncRendererPrefs();
- app_browser->window()->Show();
-}
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698