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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_ 5 #ifndef CHROME_BROWSER_SHELL_INTEGRATION_H_
6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_ 6 #define CHROME_BROWSER_SHELL_INTEGRATION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 std::string extension_id; 99 std::string extension_id;
100 bool is_platform_app; 100 bool is_platform_app;
101 string16 title; 101 string16 title;
102 string16 description; 102 string16 description;
103 base::FilePath extension_path; 103 base::FilePath extension_path;
104 gfx::ImageFamily favicon; 104 gfx::ImageFamily favicon;
105 base::FilePath profile_path; 105 base::FilePath profile_path;
106 std::string profile_name; 106 std::string profile_name;
107 }; 107 };
108 108
109 // This specifies a folder in the system applications menu (e.g the Start Menu
110 // on Windows).
111 //
112 // These represent the applications menu root, the "Google Chrome" folder and
113 // the "Chrome Apps" folder respectively.
114 //
115 // NB: On Linux, these locations may not be used by the window manager (e.g
116 // Unity and Gnome Shell).
117 enum ApplicationsMenuLocation {
118 APP_MENU_LOCATION_NONE,
119 APP_MENU_LOCATION_ROOT,
120 APP_MENU_LOCATION_SUBDIR_CHROME,
121 APP_MENU_LOCATION_SUBDIR_CHROMEAPPS,
122 };
123
109 // Info about which locations to create app shortcuts in. 124 // Info about which locations to create app shortcuts in.
110 struct ShortcutLocations { 125 struct ShortcutLocations {
111 ShortcutLocations(); 126 ShortcutLocations();
112 127
113 bool on_desktop; 128 bool on_desktop;
114 bool in_applications_menu; 129
115 string16 applications_menu_subdir; 130 ApplicationsMenuLocation applications_menu_location;
116 131
117 // For Windows, this refers to quick launch bar prior to Win7. In Win7, 132 // For Windows, this refers to quick launch bar prior to Win7. In Win7,
118 // this means "pin to taskbar". For Mac/Linux, this could be used for 133 // this means "pin to taskbar". For Mac/Linux, this could be used for
119 // Mac dock or the gnome/kde application launcher. However, those are not 134 // Mac dock or the gnome/kde application launcher. However, those are not
120 // implemented yet. 135 // implemented yet.
121 bool in_quick_launch_bar; 136 bool in_quick_launch_bar;
122 137
138 #if defined(OS_POSIX)
123 // For Linux, this refers to a shortcut which the system knows about (for 139 // For Linux, this refers to a shortcut which the system knows about (for
124 // the purpose of identifying windows and giving them the correct 140 // the purpose of identifying windows and giving them the correct
125 // title/icon), but which does not show up in menus or search results. 141 // title/icon), but which does not show up in menus or search results.
126 // Ignored if in_applications_menu == true. 142 // Ignored if applications_menu_location is not APP_MENU_LOCATION_NONE.
127 bool hidden; 143 bool hidden;
144 #endif
128 }; 145 };
129 146
130 // Data that needs to be passed between the app launcher stub and Chrome. 147 // Data that needs to be passed between the app launcher stub and Chrome.
131 struct AppModeInfo { 148 struct AppModeInfo {
132 }; 149 };
133 static void SetAppModeInfo(const AppModeInfo* info); 150 static void SetAppModeInfo(const AppModeInfo* info);
134 static const AppModeInfo* AppModeInfo(); 151 static const AppModeInfo* AppModeInfo();
135 152
136 // Is the current instance of Chrome running in App mode. 153 // Is the current instance of Chrome running in App mode.
137 bool IsRunningInAppMode(); 154 bool IsRunningInAppMode();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // This method is only public for the sake of tests and shouldn't be called 195 // This method is only public for the sake of tests and shouldn't be called
179 // externally otherwise. 196 // externally otherwise.
180 static int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe, 197 static int MigrateShortcutsInPathInternal(const base::FilePath& chrome_exe,
181 const base::FilePath& path, 198 const base::FilePath& path,
182 bool check_dual_mode); 199 bool check_dual_mode);
183 200
184 // Returns the path to the Start Menu shortcut for the given Chrome. 201 // Returns the path to the Start Menu shortcut for the given Chrome.
185 static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe); 202 static base::FilePath GetStartMenuShortcut(const base::FilePath& chrome_exe);
186 #endif // defined(OS_WIN) 203 #endif // defined(OS_WIN)
187 204
205 #if !defined(OS_WIN)
206 // TODO(calamity): replace with
207 // BrowserDistribution::GetStartMenuShortcutSubfolder() once
208 // BrowserDistribution is cross-platform.
209 // Gets the name of the Chrome Apps menu folder in which to place app
210 // shortcuts. This is needed for Mac and Linux.
211 static base::string16 GetAppShortcutsSubdirName();
212 #endif
213
188 // The current default web client application UI state. This is used when 214 // The current default web client application UI state. This is used when
189 // querying if Chrome is the default browser or the default handler 215 // querying if Chrome is the default browser or the default handler
190 // application for a url protocol, and communicates the state and result of 216 // application for a url protocol, and communicates the state and result of
191 // a request. 217 // a request.
192 enum DefaultWebClientUIState { 218 enum DefaultWebClientUIState {
193 STATE_PROCESSING, 219 STATE_PROCESSING,
194 STATE_NOT_DEFAULT, 220 STATE_NOT_DEFAULT,
195 STATE_IS_DEFAULT, 221 STATE_IS_DEFAULT,
196 STATE_UNKNOWN 222 STATE_UNKNOWN
197 }; 223 };
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // Set Chrome as the default handler for this protocol. 352 // Set Chrome as the default handler for this protocol.
327 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; 353 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE;
328 354
329 std::string protocol_; 355 std::string protocol_;
330 356
331 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); 357 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker);
332 }; 358 };
333 }; 359 };
334 360
335 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ 361 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_
OLDNEW
« 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