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

Side by Side Diff: chrome/app/chrome_main_app_mode_mac.mm

Issue 12321107: Move shell integration code from chrome/browser to apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 // On Mac, one can't make shortcuts with command-line arguments. Instead, we 5 // On Mac, one can't make shortcuts with command-line arguments. Instead, we
6 // produce small app bundles which locate the Chromium framework and load it, 6 // produce small app bundles which locate the Chromium framework and load it,
7 // passing the appropriate data. This is the entry point into the framework for 7 // passing the appropriate data. This is the entry point into the framework for
8 // those app bundles. 8 // those app bundles.
9 9
10 #include "apps/shell_integration.h"
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/mac/bundle_locations.h" 14 #include "base/mac/bundle_locations.h"
14 #include "base/mac/foundation_util.h" 15 #include "base/mac/foundation_util.h"
15 #include "base/mac/mac_logging.h" 16 #include "base/mac/mac_logging.h"
16 #include "base/mac/mac_util.h" 17 #include "base/mac/mac_util.h"
17 #include "base/mac/scoped_nsautorelease_pool.h" 18 #include "base/mac/scoped_nsautorelease_pool.h"
18 #include "base/sys_string_conversions.h" 19 #include "base/sys_string_conversions.h"
19 #include "chrome/browser/shell_integration.h"
20 #include "chrome/common/chrome_constants.h" 20 #include "chrome/common/chrome_constants.h"
21 #include "chrome/common/chrome_paths_internal.h" 21 #include "chrome/common/chrome_paths_internal.h"
22 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/mac/app_mode_common.h" 23 #include "chrome/common/mac/app_mode_common.h"
24 24
25 extern "C" { 25 extern "C" {
26 26
27 // |ChromeAppModeStart()| is the point of entry into the framework from the app 27 // |ChromeAppModeStart()| is the point of entry into the framework from the app
28 // mode loader. 28 // mode loader.
29 __attribute__((visibility("default"))) 29 __attribute__((visibility("default")))
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 forKeyword:app_mode::kAEProfileDirKey]; 80 forKeyword:app_mode::kAEProfileDirKey];
81 ls_parameters.initialEvent = const_cast<AEDesc*>([initial_event aeDesc]); 81 ls_parameters.initialEvent = const_cast<AEDesc*>([initial_event aeDesc]);
82 // Send the Apple Event using launch services, launching Chrome if necessary. 82 // Send the Apple Event using launch services, launching Chrome if necessary.
83 OSStatus status = LSOpenApplication(&ls_parameters, NULL); 83 OSStatus status = LSOpenApplication(&ls_parameters, NULL);
84 if (status != noErr) { 84 if (status != noErr) {
85 OSSTATUS_LOG(ERROR, status) << "LSOpenApplication"; 85 OSSTATUS_LOG(ERROR, status) << "LSOpenApplication";
86 return 1; 86 return 1;
87 } 87 }
88 return 0; 88 return 0;
89 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698