OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/shell/shell_main_delegate.h" | 5 #include "content/shell/shell_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 NOTREACHED(); | 54 NOTREACHED(); |
55 #endif | 55 #endif |
56 } | 56 } |
57 | 57 |
58 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { | 58 bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { |
59 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { | 59 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { |
60 InitLogging(); | 60 InitLogging(); |
61 CommandLine::ForCurrentProcess()->AppendSwitch( | 61 CommandLine::ForCurrentProcess()->AppendSwitch( |
62 switches::kAllowFileAccessFromFiles); | 62 switches::kAllowFileAccessFromFiles); |
63 } | 63 } |
64 #if defined(OS_MACOSX) | |
65 OverrideFrameworkBundlePath(); | |
66 #endif | |
67 SetContentClient(&content_client_); | 64 SetContentClient(&content_client_); |
68 return false; | 65 return false; |
69 } | 66 } |
70 | 67 |
71 void ShellMainDelegate::PreSandboxStartup() { | 68 void ShellMainDelegate::PreSandboxStartup() { |
72 #if defined(OS_MACOSX) | 69 #if defined(OS_MACOSX) |
70 OverrideFrameworkBundlePath(); | |
Avi (use Gerrit)
2012/07/31 14:54:58
Note that the location of this call was mirroring
jochen (gone - plz use gerrit)
2012/07/31 14:59:26
I don't know why it's called there.
The problem i
| |
73 OverrideChildProcessPath(); | 71 OverrideChildProcessPath(); |
74 #endif // OS_MACOSX | 72 #endif // OS_MACOSX |
75 InitializeResourceBundle(); | 73 InitializeResourceBundle(); |
76 } | 74 } |
77 | 75 |
78 int ShellMainDelegate::RunProcess( | 76 int ShellMainDelegate::RunProcess( |
79 const std::string& process_type, | 77 const std::string& process_type, |
80 const MainFunctionParams& main_function_params) { | 78 const MainFunctionParams& main_function_params) { |
81 if (!process_type.empty()) | 79 if (!process_type.empty()) |
82 return -1; | 80 return -1; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 browser_client_.reset(new ShellContentBrowserClient); | 130 browser_client_.reset(new ShellContentBrowserClient); |
133 return browser_client_.get(); | 131 return browser_client_.get(); |
134 } | 132 } |
135 | 133 |
136 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 134 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
137 renderer_client_.reset(new ShellContentRendererClient); | 135 renderer_client_.reset(new ShellContentRendererClient); |
138 return renderer_client_.get(); | 136 return renderer_client_.get(); |
139 } | 137 } |
140 | 138 |
141 } // namespace content | 139 } // namespace content |
OLD | NEW |