Commit f1f77bfa authored by lliabraa's avatar lliabraa Committed by Commit bot

[iOS] Load chrome_300_percent.pak file on @3x devices.

This CL adds support for loading assets from the chrome_300_percent.pak
file on devices that support @3x scale.

BUG=423762

Review URL: https://codereview.chromium.org/646773004

Cr-Commit-Position: refs/heads/master@{#301142}
parent 15de8205
......@@ -469,6 +469,7 @@ base::StringPiece ResourceBundle::GetRawDataResourceForScale(
for (size_t i = 0; i < data_packs_.size(); i++) {
if ((data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_100P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_200P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_300P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE) &&
data_packs_[i]->GetStringPiece(static_cast<uint16>(resource_id),
&data))
......
......@@ -54,11 +54,9 @@ void ResourceBundle::LoadCommonResources() {
SCALE_FACTOR_200P);
}
// TODO(rohitrao): Add a chrome_300_percent file and load it here. For now,
// we are simply falling back to the 200P resources. http://crbug.com/413300.
if (IsScaleFactorSupported(SCALE_FACTOR_300P)) {
AddDataPackFromPath(GetResourcesPakFilePath(@"chrome_200_percent", nil),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(@"chrome_300_percent", nil),
SCALE_FACTOR_300P);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment