OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/navigation/content_client/main_delegate.h" | 5 #include "services/navigation/content_client/main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 *base::CommandLine::ForCurrentProcess(); | 22 *base::CommandLine::ForCurrentProcess(); |
23 std::string process_type = | 23 std::string process_type = |
24 command_line.GetSwitchValueASCII(switches::kProcessType); | 24 command_line.GetSwitchValueASCII(switches::kProcessType); |
25 | 25 |
26 content::SetContentClient(&content_client_); | 26 content::SetContentClient(&content_client_); |
27 | 27 |
28 return false; | 28 return false; |
29 } | 29 } |
30 | 30 |
31 void MainDelegate::PreSandboxStartup() { | 31 void MainDelegate::PreSandboxStartup() { |
| 32 base::FilePath path; |
| 33 PathService::Get(base::DIR_MODULE, &path); |
| 34 base::FilePath pak_path = path.Append(FILE_PATH_LITERAL("navigation.pak")); |
| 35 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_path); |
32 ui::InitializeInputMethodForTesting(); | 36 ui::InitializeInputMethodForTesting(); |
33 } | 37 } |
34 | 38 |
35 content::ContentBrowserClient* MainDelegate::CreateContentBrowserClient() { | 39 content::ContentBrowserClient* MainDelegate::CreateContentBrowserClient() { |
36 browser_client_.reset(new ContentBrowserClient); | 40 browser_client_.reset(new ContentBrowserClient); |
37 return browser_client_.get(); | 41 return browser_client_.get(); |
38 } | 42 } |
39 | 43 |
40 } // namespace navigation | 44 } // namespace navigation |
OLD | NEW |