| 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 "ui/views_content_client/views_content_main_delegate.h" | 5 #include "ui/views_content_client/views_content_main_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 logging::LogEventProvider::Initialize(kViewsContentClientProviderName); | 54 logging::LogEventProvider::Initialize(kViewsContentClientProviderName); |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void ViewsContentMainDelegate::PreSandboxStartup() { | 60 void ViewsContentMainDelegate::PreSandboxStartup() { |
| 61 base::FilePath ui_test_pak_path; | 61 base::FilePath ui_test_pak_path; |
| 62 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); | 62 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| 63 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 63 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| 64 |
| 65 base::FilePath content_resources_pak_path; |
| 66 PathService::Get(base::DIR_MODULE, &content_resources_pak_path); |
| 67 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
| 68 content_resources_pak_path.AppendASCII("content_resources.pak"), |
| 69 ui::SCALE_FACTOR_100P); |
| 64 } | 70 } |
| 65 | 71 |
| 66 content::ContentBrowserClient* | 72 content::ContentBrowserClient* |
| 67 ViewsContentMainDelegate::CreateContentBrowserClient() { | 73 ViewsContentMainDelegate::CreateContentBrowserClient() { |
| 68 browser_client_.reset(new ViewsContentBrowserClient(views_content_client_)); | 74 browser_client_.reset(new ViewsContentBrowserClient(views_content_client_)); |
| 69 return browser_client_.get(); | 75 return browser_client_.get(); |
| 70 } | 76 } |
| 71 | 77 |
| 72 } // namespace ui | 78 } // namespace ui |
| OLD | NEW |