summaryrefslogtreecommitdiffstats
path: root/base/mac/launch_services_util.cc
diff options
context:
space:
mode:
authorjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-24 11:05:33 +0000
committerjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-24 11:05:33 +0000
commit2fd243794b1049ea40f94d839f16d35ff403879b (patch)
tree2ca3e2f614082adf92d495c8cbaed1ba34d6b6bf /base/mac/launch_services_util.cc
parent0a62104c0b55ea0402b154358e3ffbdcfbadf093 (diff)
downloadchromium_src-2fd243794b1049ea40f94d839f16d35ff403879b.zip
chromium_src-2fd243794b1049ea40f94d839f16d35ff403879b.tar.gz
chromium_src-2fd243794b1049ea40f94d839f16d35ff403879b.tar.bz2
Fix app shim focus.
When launching an app from Chrome, start the app shim without activating it. In case the app was launched from the shim, focus the app when its first window opens. BUG=263217 TEST=Start an app from the NTP. The shim should start without stealing focus. Quit and restart the app from the shim. The app's first window should take focus. Close the window and click the app's dock icon. A new window should open and take focus. Review URL: https://chromiumcodereview.appspot.com/20037002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac/launch_services_util.cc')
-rw-r--r--base/mac/launch_services_util.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/base/mac/launch_services_util.cc b/base/mac/launch_services_util.cc
index 0081500..6121081 100644
--- a/base/mac/launch_services_util.cc
+++ b/base/mac/launch_services_util.cc
@@ -4,8 +4,6 @@
#include "base/mac/launch_services_util.h"
-#include <ApplicationServices/ApplicationServices.h>
-
#include "base/logging.h"
#include "base/mac/mac_logging.h"
#include "base/mac/mac_util.h"
@@ -16,6 +14,7 @@ namespace mac {
bool OpenApplicationWithPath(const base::FilePath& bundle_path,
const CommandLine& command_line,
+ LSLaunchFlags launch_flags,
ProcessSerialNumber* out_psn) {
FSRef app_fsref;
if (!base::mac::FSRefFromPath(bundle_path.value(), &app_fsref)) {
@@ -45,7 +44,7 @@ bool OpenApplicationWithPath(const base::FilePath& bundle_path,
LSApplicationParameters ls_parameters = {
0, // version
- kLSLaunchDefaults,
+ launch_flags,
&app_fsref,
NULL, // asyncLaunchRefCon
NULL, // environment