summaryrefslogtreecommitdiffstats
path: root/chrome/common/web_apps.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 /chrome/common/web_apps.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 'chrome/common/web_apps.cc')
-rw-r--r--chrome/common/web_apps.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/common/web_apps.cc b/chrome/common/web_apps.cc
index bfcf199..1564754 100644
--- a/chrome/common/web_apps.cc
+++ b/chrome/common/web_apps.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.
@@ -25,6 +25,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/size.h"
#include "webkit/glue/dom_operations.h"
@@ -216,7 +217,8 @@ bool ParseWebAppFromDefinitionFile(Value* definition_value,
scoped_ptr<Value> schema(
base::JSONReader::ReadAndReturnError(
ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_WEB_APP_SCHEMA).as_string(),
+ IDR_WEB_APP_SCHEMA,
+ ui::SCALE_FACTOR_NONE).as_string(),
base::JSON_PARSE_RFC, // options
&error_code,
&error_message));