| 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 "ash/shell/content/client/shell_main_delegate.h" | 5 #include "ash/shell/content/client/shell_main_delegate.h" |
| 6 | 6 |
| 7 #include "ash/shell/content/client/shell_content_browser_client.h" | 7 #include "ash/shell/content/client/shell_content_browser_client.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 browser_client_.reset(new ShellContentBrowserClient); | 39 browser_client_.reset(new ShellContentBrowserClient); |
| 40 return browser_client_.get(); | 40 return browser_client_.get(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void ShellMainDelegate::InitializeResourceBundle() { | 43 void ShellMainDelegate::InitializeResourceBundle() { |
| 44 // Load ash resources and strings; not 'common' (Chrome) resources. | 44 // Load ash resources and strings; not 'common' (Chrome) resources. |
| 45 base::FilePath path; | 45 base::FilePath path; |
| 46 PathService::Get(base::DIR_MODULE, &path); | 46 PathService::Get(base::DIR_MODULE, &path); |
| 47 base::FilePath ash_test_strings = | 47 base::FilePath ash_test_strings = |
| 48 path.Append(FILE_PATH_LITERAL("ash_test_strings.pak")); | 48 path.Append(FILE_PATH_LITERAL("ash_test_strings.pak")); |
| 49 base::FilePath ash_test_resources_100 = | |
| 50 path.Append(FILE_PATH_LITERAL("ash_test_resources_100_percent.pak")); | |
| 51 base::FilePath ash_test_resources_200 = | |
| 52 path.Append(FILE_PATH_LITERAL("ash_test_resources_200_percent.pak")); | |
| 53 | 49 |
| 54 ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings); | 50 ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings); |
| 55 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 51 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 56 if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_100P)) | 52 if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_100P)) { |
| 53 base::FilePath ash_test_resources_100 = path.Append( |
| 54 FILE_PATH_LITERAL("ash_test_resources_with_content_100_percent.pak")); |
| 57 rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P); | 55 rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P); |
| 58 if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_200P)) | 56 } |
| 57 if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_200P)) { |
| 58 base::FilePath ash_test_resources_200 = |
| 59 path.Append(FILE_PATH_LITERAL("ash_test_resources_200_percent.pak")); |
| 59 rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P); | 60 rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P); |
| 61 } |
| 60 } | 62 } |
| 61 | 63 |
| 62 } // namespace shell | 64 } // namespace shell |
| 63 } // namespace ash | 65 } // namespace ash |
| OLD | NEW |