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

Unified Diff: extensions/shell/app/shell_main_delegate.cc

Issue 745093002: AppShell support for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests too Created 6 years 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
Index: extensions/shell/app/shell_main_delegate.cc
diff --git a/extensions/shell/app/shell_main_delegate.cc b/extensions/shell/app/shell_main_delegate.cc
index 69f0e6181b661fb1d15aec4b6a4fca096d28abe4..c1479fa9fa4392db31c50497fb1d629bcf203e5c 100644
--- a/extensions/shell/app/shell_main_delegate.cc
+++ b/extensions/shell/app/shell_main_delegate.cc
@@ -22,7 +22,12 @@
#include "chromeos/chromeos_paths.h"
#endif
-#if !defined(DISABLE_NACL)
+#if defined(OS_MACOSX)
+#include "extensions/shell/app/paths_mac.h"
+#endif
+
+#if !defined(DISABLE_NACL) && defined(OS_POSIX) && !defined(OS_MACOSX) && \
+ !defined(OS_ANDROID)
#include "components/nacl/common/nacl_switches.h"
#if defined(OS_LINUX)
#include "components/nacl/common/nacl_paths.h"
@@ -61,6 +66,12 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
content_client_.reset(CreateContentClient());
SetContentClient(content_client_.get());
+#if defined(OS_MACOSX)
+ OverrideChildProcessFilePath();
+ // This must happen before InitializeResourceBundle.
+ OverrideFrameworkBundlePath();
+#endif
+
#if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider();
#endif
@@ -125,10 +136,16 @@ ShellMainDelegate::CreateShellContentUtilityClient() {
void ShellMainDelegate::InitializeResourceBundle() {
base::FilePath extensions_shell_and_test_pak_path;
+#if defined(OS_MACOSX)
+ extensions_shell_and_test_pak_path = GetResourcesPakFilePath();
+#else
PathService::Get(base::DIR_MODULE, &extensions_shell_and_test_pak_path);
- ui::ResourceBundle::InitSharedInstanceWithPakPath(
+ extensions_shell_and_test_pak_path =
extensions_shell_and_test_pak_path.AppendASCII(
- "extensions_shell_and_test.pak"));
+ "extensions_shell_and_test.pak");
+#endif // OS_MACOSX
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(
+ extensions_shell_and_test_pak_path);
}
// static

Powered by Google App Engine
This is Rietveld 408576698