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

Unified Diff: chrome/app/chrome_main_app_mode_mac.mm

Issue 9618021: Infrastructure to improve app mode stub <-> Chrome main communication. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Another approach Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_app_mode_mac.mm
diff --git a/chrome/app/chrome_main_app_mode_mac.mm b/chrome/app/chrome_main_app_mode_mac.mm
index 043f87fd21fa1ffca22fd9c93107c1444341e88e..d78a0a5be1cf4f390e59bf3921de68d1b480d471 100644
--- a/chrome/app/chrome_main_app_mode_mac.mm
+++ b/chrome/app/chrome_main_app_mode_mac.mm
@@ -7,13 +7,12 @@
// passing the appropriate data. This is the entry point into the framework for
// those app bundles.
-#include <string> // TODO(viettrungluu): only needed for temporary hack
-
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
+#include "chrome/browser/shell_integration.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
@@ -49,6 +48,11 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
base::mac::SetOverrideFrameworkBundlePath(
chrome_versioned_path->Append(chrome::kFrameworkName));
+ // This struct is used to communicate information to the Chrome code, prefer
+ // this to modifying the command line below.
+ struct ShellIntegration::AppModeInfo app_mode_info;
+ ShellIntegration::SetAppModeInfo(&app_mode_info);
+
CommandLine command_line(CommandLine::NO_PROGRAM);
command_line.AppendSwitch(info->argv[0]);
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698