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

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

Issue 585123004: Mac: Give app_shim code a nicer home (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: various cleanups Created 6 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/app_shim/app_shim.gypi ('k') | chrome/browser/BUILD.gn » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import <Cocoa/Cocoa.h> 10 #import <Cocoa/Cocoa.h>
11 #include <vector> 11 #include <vector>
12 12
13 #include "apps/app_shim/app_shim_messages.h"
14 #include "base/at_exit.h" 13 #include "base/at_exit.h"
15 #include "base/command_line.h" 14 #include "base/command_line.h"
16 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
17 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
18 #include "base/logging.h" 17 #include "base/logging.h"
19 #include "base/mac/bundle_locations.h" 18 #include "base/mac/bundle_locations.h"
20 #include "base/mac/foundation_util.h" 19 #include "base/mac/foundation_util.h"
21 #include "base/mac/launch_services_util.h" 20 #include "base/mac/launch_services_util.h"
22 #include "base/mac/mac_logging.h" 21 #include "base/mac/mac_logging.h"
23 #include "base/mac/mac_util.h" 22 #include "base/mac/mac_util.h"
24 #include "base/mac/scoped_nsautorelease_pool.h" 23 #include "base/mac/scoped_nsautorelease_pool.h"
25 #include "base/mac/scoped_nsobject.h" 24 #include "base/mac/scoped_nsobject.h"
26 #include "base/mac/sdk_forward_declarations.h" 25 #include "base/mac/sdk_forward_declarations.h"
27 #include "base/message_loop/message_loop.h" 26 #include "base/message_loop/message_loop.h"
28 #include "base/path_service.h" 27 #include "base/path_service.h"
29 #include "base/strings/string_number_conversions.h" 28 #include "base/strings/string_number_conversions.h"
30 #include "base/strings/sys_string_conversions.h" 29 #include "base/strings/sys_string_conversions.h"
31 #include "base/threading/thread.h" 30 #include "base/threading/thread.h"
32 #include "chrome/common/chrome_constants.h" 31 #include "chrome/common/chrome_constants.h"
33 #include "chrome/common/chrome_paths.h" 32 #include "chrome/common/chrome_paths.h"
34 #include "chrome/common/chrome_switches.h" 33 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/mac/app_mode_common.h" 34 #include "chrome/common/mac/app_mode_common.h"
36 #include "grit/generated_resources.h" 35 #include "chrome/common/mac/app_shim_messages.h"
36 #include "chrome/grit/generated_resources.h"
37 #include "ipc/ipc_channel_proxy.h" 37 #include "ipc/ipc_channel_proxy.h"
38 #include "ipc/ipc_listener.h" 38 #include "ipc/ipc_listener.h"
39 #include "ipc/ipc_message.h" 39 #include "ipc/ipc_message.h"
40 #include "ui/base/l10n/l10n_util.h" 40 #include "ui/base/l10n/l10n_util.h"
41 #include "ui/base/resource/resource_bundle.h" 41 #include "ui/base/resource/resource_bundle.h"
42 42
43 namespace { 43 namespace {
44 44
45 // Timeout in seconds to wait for a reply for the initial Apple Event. Note that 45 // Timeout in seconds to wait for a reply for the initial Apple Event. Note that
46 // kAEDefaultTimeout on Mac is "about one minute" according to Apple's 46 // kAEDefaultTimeout on Mac is "about one minute" according to Apple's
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // minute. 684 // minute.
685 main_message_loop.PostTask( 685 main_message_loop.PostTask(
686 FROM_HERE, 686 FROM_HERE,
687 base::Bind(&AppShimController::Init, 687 base::Bind(&AppShimController::Init,
688 base::Unretained(&controller))); 688 base::Unretained(&controller)));
689 } 689 }
690 690
691 main_message_loop.Run(); 691 main_message_loop.Run();
692 return 0; 692 return 0;
693 } 693 }
OLDNEW
« no previous file with comments | « chrome/app_shim/app_shim.gypi ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698