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

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: fix win 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..0ec398f6b9cf0a00b927e2b154d79f4cdcadf219 100644
--- a/extensions/shell/app/shell_main_delegate.cc
+++ b/extensions/shell/app/shell_main_delegate.cc
@@ -22,6 +22,10 @@
#include "chromeos/chromeos_paths.h"
#endif
+#if defined(OS_MACOSX)
+#include "extensions/shell/app/paths_mac.h"
+#endif
+
#if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_switches.h"
#if defined(OS_LINUX)
@@ -61,6 +65,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 +135,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();
James Cook 2014/12/10 21:05:00 It feels a little weird that sometimes you call a
Yoyo Zhou 2014/12/11 02:40:50 I moved the GetResourcesPakFilePath implementation
+#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