| 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); | |
| 36 ui::InitializeInputMethodForTesting(); | 32 ui::InitializeInputMethodForTesting(); |
| 37 } | 33 } |
| 38 | 34 |
| 39 content::ContentBrowserClient* MainDelegate::CreateContentBrowserClient() { | 35 content::ContentBrowserClient* MainDelegate::CreateContentBrowserClient() { |
| 40 browser_client_.reset(new ContentBrowserClient); | 36 browser_client_.reset(new ContentBrowserClient); |
| 41 return browser_client_.get(); | 37 return browser_client_.get(); |
| 42 } | 38 } |
| 43 | 39 |
| 44 } // namespace navigation | 40 } // namespace navigation |
| OLD | NEW |