Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: ash/shell/content/client/shell_main_delegate.cc

Issue 2316803002: Splits ash_test_resources_100_percent into two pak files (Closed)
Patch Set: feedback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/resources/BUILD.gn ('k') | ash/test/ash_test_environment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/resources/BUILD.gn ('k') | ash/test/ash_test_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698