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

Side by Side Diff: ui/base/resource/resource_bundle.cc

Issue 646773004: [iOS] Load chrome_300_percent.pak file on @3x devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | ui/base/resource/resource_bundle_ios.mm » ('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 "ui/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/big_endian.h" 10 #include "base/big_endian.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 if (scale_factor != ui::SCALE_FACTOR_100P) { 462 if (scale_factor != ui::SCALE_FACTOR_100P) {
463 for (size_t i = 0; i < data_packs_.size(); i++) { 463 for (size_t i = 0; i < data_packs_.size(); i++) {
464 if (data_packs_[i]->GetScaleFactor() == scale_factor && 464 if (data_packs_[i]->GetScaleFactor() == scale_factor &&
465 data_packs_[i]->GetStringPiece(resource_id, &data)) 465 data_packs_[i]->GetStringPiece(resource_id, &data))
466 return data; 466 return data;
467 } 467 }
468 } 468 }
469 for (size_t i = 0; i < data_packs_.size(); i++) { 469 for (size_t i = 0; i < data_packs_.size(); i++) {
470 if ((data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_100P || 470 if ((data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_100P ||
471 data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_200P || 471 data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_200P ||
472 data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_300P ||
472 data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE) && 473 data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE) &&
473 data_packs_[i]->GetStringPiece(resource_id, &data)) 474 data_packs_[i]->GetStringPiece(resource_id, &data))
474 return data; 475 return data;
475 } 476 }
476 477
477 return base::StringPiece(); 478 return base::StringPiece();
478 } 479 }
479 480
480 base::string16 ResourceBundle::GetLocalizedString(int message_id) { 481 base::string16 ResourceBundle::GetLocalizedString(int message_id) {
481 base::string16 string; 482 base::string16 string;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 // static 857 // static
857 bool ResourceBundle::DecodePNG(const unsigned char* buf, 858 bool ResourceBundle::DecodePNG(const unsigned char* buf,
858 size_t size, 859 size_t size,
859 SkBitmap* bitmap, 860 SkBitmap* bitmap,
860 bool* fell_back_to_1x) { 861 bool* fell_back_to_1x) {
861 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size); 862 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size);
862 return gfx::PNGCodec::Decode(buf, size, bitmap); 863 return gfx::PNGCodec::Decode(buf, size, bitmap);
863 } 864 }
864 865
865 } // namespace ui 866 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/base/resource/resource_bundle_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698