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

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

Issue 9958006: Create Linux platform app shortcuts to run in their own process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved new function into shell_integration_linux.h Created 8 years, 8 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/shell_integration.h ('k') | chrome/browser/shell_integration_linux.h » ('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 #include "chrome/browser/shell_integration.h" 5 #include "chrome/browser/shell_integration.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 new_cmd_line.AppendSwitchPath(switches::kUserDataDir, absolute_user_data_dir); 107 new_cmd_line.AppendSwitchPath(switches::kUserDataDir, absolute_user_data_dir);
108 108
109 #if defined(OS_CHROMEOS) 109 #if defined(OS_CHROMEOS)
110 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); 110 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess();
111 FilePath profile = cmd_line.GetSwitchValuePath(switches::kLoginProfile); 111 FilePath profile = cmd_line.GetSwitchValuePath(switches::kLoginProfile);
112 if (!profile.empty()) 112 if (!profile.empty())
113 new_cmd_line.AppendSwitchPath(switches::kLoginProfile, profile); 113 new_cmd_line.AppendSwitchPath(switches::kLoginProfile, profile);
114 #endif 114 #endif
115 115
116 new_cmd_line.AppendSwitchASCII(switches::kAppId, extension_app_id); 116 new_cmd_line.AppendSwitchASCII(switches::kAppId, extension_app_id);
117 new_cmd_line.AppendSwitch(switches::kEnablePlatformApps);
117 118
118 // Convert path to absolute and ensure it exists. 119 // Convert path to absolute and ensure it exists.
119 FilePath absolute_extension_path(extension_path); 120 FilePath absolute_extension_path(extension_path);
120 DCHECK(file_util::AbsolutePath(&absolute_extension_path) && 121 DCHECK(file_util::AbsolutePath(&absolute_extension_path) &&
121 file_util::PathExists(absolute_extension_path)); 122 file_util::PathExists(absolute_extension_path));
122 // TODO(sail): Use a different flag that doesn't imply Location::LOAD for the 123 // TODO(sail): Use a different flag that doesn't imply Location::LOAD for the
123 // extension. 124 // extension.
124 new_cmd_line.AppendSwitchPath(switches::kLoadExtension, 125 new_cmd_line.AppendSwitchPath(switches::kLoadExtension,
125 absolute_extension_path); 126 absolute_extension_path);
126 127
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // DefaultProtocolClientWorker, private: 256 // DefaultProtocolClientWorker, private:
256 257
257 ShellIntegration::DefaultWebClientState 258 ShellIntegration::DefaultWebClientState
258 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() { 259 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() {
259 return ShellIntegration::IsDefaultProtocolClient(protocol_); 260 return ShellIntegration::IsDefaultProtocolClient(protocol_);
260 } 261 }
261 262
262 void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault() { 263 void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault() {
263 ShellIntegration::SetAsDefaultProtocolClient(protocol_); 264 ShellIntegration::SetAsDefaultProtocolClient(protocol_);
264 } 265 }
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration.h ('k') | chrome/browser/shell_integration_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698