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

Unified Diff: chrome/browser/shell_integration.h

Issue 13864015: Move app launcher and chrome apps shortcut strings into the installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migrate_app_id_fix
Patch Set: fix win compile, change LOG(INFO)s to VLOG(1) Created 7 years 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
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/shell_integration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration.h
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index f8559844e8d7df644f469c4825333001d33245c1..8d287983c44d141516f0245dd7456dc1a3f0179c 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -106,13 +106,28 @@ class ShellIntegration {
std::string profile_name;
};
+ // This specifies a folder in the system applications menu (e.g the Start Menu
+ // on Windows).
+ //
+ // These represent the applications menu root, the "Google Chrome" folder and
+ // the "Chrome Apps" folder respectively.
+ //
+ // NB: On Linux, these locations may not be used by the window manager (e.g
+ // Unity and Gnome Shell).
+ enum ApplicationsMenuLocation {
+ APP_MENU_LOCATION_NONE,
+ APP_MENU_LOCATION_ROOT,
+ APP_MENU_LOCATION_SUBDIR_CHROME,
+ APP_MENU_LOCATION_SUBDIR_CHROMEAPPS,
+ };
+
// Info about which locations to create app shortcuts in.
struct ShortcutLocations {
ShortcutLocations();
bool on_desktop;
- bool in_applications_menu;
- string16 applications_menu_subdir;
+
+ ApplicationsMenuLocation applications_menu_location;
// For Windows, this refers to quick launch bar prior to Win7. In Win7,
// this means "pin to taskbar". For Mac/Linux, this could be used for
@@ -120,11 +135,13 @@ class ShellIntegration {
// implemented yet.
bool in_quick_launch_bar;
+#if defined(OS_POSIX)
// For Linux, this refers to a shortcut which the system knows about (for
// the purpose of identifying windows and giving them the correct
// title/icon), but which does not show up in menus or search results.
- // Ignored if in_applications_menu == true.
+ // Ignored if applications_menu_location is not APP_MENU_LOCATION_NONE.
bool hidden;
+#endif
};
// Data that needs to be passed between the app launcher stub and Chrome.
@@ -185,6 +202,15 @@ class ShellIntegration {
static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe);
#endif // defined(OS_WIN)
+#if !defined(OS_WIN)
+ // TODO(calamity): replace with
+ // BrowserDistribution::GetStartMenuShortcutSubfolder() once
+ // BrowserDistribution is cross-platform.
+ // Gets the name of the Chrome Apps menu folder in which to place app
+ // shortcuts. This is needed for Mac and Linux.
+ static base::string16 GetAppShortcutsSubdirName();
+#endif
+
// The current default web client application UI state. This is used when
// querying if Chrome is the default browser or the default handler
// application for a url protocol, and communicates the state and result of
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/browser/shell_integration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698