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

Side by Side Diff: chrome/browser/shell_integration.h

Issue 10915079: remove --enable-experimental-extension-apis from packaged app shortcut args (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: is_platform_app data member on ShortcutInfo no longer required Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // If |extension_id| is non-empty, this is short cut is to an extension-app 82 // If |extension_id| is non-empty, this is short cut is to an extension-app
83 // and the launch url will be detected at start-up. In this case, |url| 83 // and the launch url will be detected at start-up. In this case, |url|
84 // is still used to generate the app id (windows app id, not chrome app id). 84 // is still used to generate the app id (windows app id, not chrome app id).
85 std::string extension_id; 85 std::string extension_id;
86 string16 title; 86 string16 title;
87 string16 description; 87 string16 description;
88 FilePath extension_path; 88 FilePath extension_path;
89 gfx::Image favicon; 89 gfx::Image favicon;
90 FilePath profile_path; 90 FilePath profile_path;
91 91
92 // Shortcuts to platform apps are created differently. They start up with
93 // their own user data directory and load the app from |extension_path|.
94 bool is_platform_app;
95 bool create_on_desktop; 92 bool create_on_desktop;
96 bool create_in_applications_menu; 93 bool create_in_applications_menu;
97 94
98 // For Windows, this refers to quick launch bar prior to Win7. In Win7, 95 // For Windows, this refers to quick launch bar prior to Win7. In Win7,
99 // this means "pin to taskbar". For Mac/Linux, this could be used for 96 // this means "pin to taskbar". For Mac/Linux, this could be used for
100 // Mac dock or the gnome/kde application launcher. However, those are not 97 // Mac dock or the gnome/kde application launcher. However, those are not
101 // implemented yet. 98 // implemented yet.
102 bool create_in_quick_launch_bar; 99 bool create_in_quick_launch_bar;
103 }; 100 };
104 101
105 // Data that needs to be passed between the app launcher stub and Chrome. 102 // Data that needs to be passed between the app launcher stub and Chrome.
106 struct AppModeInfo { 103 struct AppModeInfo {
107 }; 104 };
108 static void SetAppModeInfo(const AppModeInfo* info); 105 static void SetAppModeInfo(const AppModeInfo* info);
109 static const AppModeInfo* AppModeInfo(); 106 static const AppModeInfo* AppModeInfo();
110 107
111 // Is the current instance of Chrome running in App mode. 108 // Is the current instance of Chrome running in App mode.
112 bool IsRunningInAppMode(); 109 bool IsRunningInAppMode();
113 110
114 // Set up command line arguments for launching a URL or an app. 111 // Set up command line arguments for launching a URL or an app.
115 // The new command line reuses the current process's user data directory (and 112 // The new command line reuses the current process's user data directory (and
116 // login profile, for ChromeOS). 113 // login profile, for ChromeOS).
117 // If |extension_app_id| is non-empty, the arguments use kAppId=<id>. 114 // If |extension_app_id| is non-empty, the arguments use kAppId=<id>.
118 // Otherwise, kApp=<url> is used. If |is_platform_app| is true the flag 115 // Otherwise, kApp=<url> is used.
119 // --enable-platform-apps is added to the command line.
120 static CommandLine CommandLineArgsForLauncher( 116 static CommandLine CommandLineArgsForLauncher(
121 const GURL& url, 117 const GURL& url,
122 const std::string& extension_app_id, 118 const std::string& extension_app_id,
123 bool is_platform_app,
124 const FilePath& profile_path); 119 const FilePath& profile_path);
125 120
126 #if defined(OS_WIN) 121 #if defined(OS_WIN)
127 // Generates an application user model ID (AppUserModelId) for a given app 122 // Generates an application user model ID (AppUserModelId) for a given app
128 // name and profile path. The returned app id is in the format of 123 // name and profile path. The returned app id is in the format of
129 // "|app_name|[.<profile_id>]". "profile_id" is appended when user override 124 // "|app_name|[.<profile_id>]". "profile_id" is appended when user override
130 // the default value. 125 // the default value.
131 // Note: If the app has an installation specific suffix (e.g. on user-level 126 // Note: If the app has an installation specific suffix (e.g. on user-level
132 // Chrome installs), |app_name| should already be suffixed, this method will 127 // Chrome installs), |app_name| should already be suffixed, this method will
133 // then further suffix it with the profile id as described above. 128 // then further suffix it with the profile id as described above.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // Set Chrome as the default handler for this protocol. 291 // Set Chrome as the default handler for this protocol.
297 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE; 292 virtual bool SetAsDefault(bool interactive_permitted) OVERRIDE;
298 293
299 std::string protocol_; 294 std::string protocol_;
300 295
301 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker); 296 DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker);
302 }; 297 };
303 }; 298 };
304 299
305 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_ 300 #endif // CHROME_BROWSER_SHELL_INTEGRATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.cc ('k') | chrome/browser/shell_integration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698