summaryrefslogtreecommitdiffstats
path: root/ui/base/resource/data_pack_literal.cc
diff options
context:
space:
mode:
authorflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 21:05:40 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 21:05:40 +0000
commitbebfb2ed2025f1e0f99dbcf3aa9af48cc6e8ac0f (patch)
tree2858dc6858da0f4c70b7d4fa2d11ba02ca83fde6 /ui/base/resource/data_pack_literal.cc
parentc145c83565c8c019f97d0280d12c623352e1c58e (diff)
downloadchromium_src-bebfb2ed2025f1e0f99dbcf3aa9af48cc6e8ac0f.zip
chromium_src-bebfb2ed2025f1e0f99dbcf3aa9af48cc6e8ac0f.tar.gz
chromium_src-bebfb2ed2025f1e0f99dbcf3aa9af48cc6e8ac0f.tar.bz2
Select theme resources from ResourceBundle at requested scale factor.
Return the best match for a requested scale factor when fetching raw image data from ResourceBundle. TBR=aa,abodenha BUG=123611 TEST=ResourceBundle.LoadImageResourceBytes Review URL: https://chromiumcodereview.appspot.com/10387010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource/data_pack_literal.cc')
-rw-r--r--ui/base/resource/data_pack_literal.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/ui/base/resource/data_pack_literal.cc b/ui/base/resource/data_pack_literal.cc
index 510d07a..05e610b 100644
--- a/ui/base/resource/data_pack_literal.cc
+++ b/ui/base/resource/data_pack_literal.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,4 +21,23 @@ extern const char kSamplePakContents[] = {
extern const size_t kSamplePakSize = sizeof(kSamplePakContents);
+extern const char kSamplePakContents2x[] = {
+ 0x04, 0x00, 0x00, 0x00, // header(version
+ 0x01, 0x00, 0x00, 0x00, // no. entries
+ 0x01, // encoding)
+ 0x04, 0x00, 0x15, 0x00, 0x00, 0x00, // index entry 4
+ 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, // extra entry for the size of last
+ 't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '4', ' ', '2', 'x'
+};
+
+extern const size_t kSamplePakSize2x = sizeof(kSamplePakContents2x);
+
+extern const char kEmptyPakContents[] = {
+ 0x04, 0x00, 0x00, 0x00, // header(version
+ 0x00, 0x00, 0x00, 0x00, // no. entries
+ 0x01
+};
+
+extern const size_t kEmptyPakSize = sizeof(kEmptyPakContents);
+
} // namespace ui