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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 369bc0a826f17a75e426a796669bf9d5bdce9a7f..040c8b0ab44ffe7fc89269f1adfa5a7e6d81b11f 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -9,9 +9,9 @@
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
-#include "base/stringprintf.h"
#include "base/string_split.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
@@ -25,6 +25,7 @@
#include "grit/common_resources.h"
#include "remoting/client/plugin/pepper_entrypoints.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/glue/user_agent.h"
#include "webkit/plugins/npapi/plugin_list.h"
@@ -415,16 +416,11 @@ string16 ChromeContentClient::GetLocalizedString(int message_id) const {
return l10n_util::GetStringUTF16(message_id);
}
-base::StringPiece ChromeContentClient::GetDataResource(int resource_id) const {
- return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
-}
-
-base::StringPiece ChromeContentClient::GetImageResource(
+base::StringPiece ChromeContentClient::GetDataResource(
int resource_id,
- float scale_factor) const {
- // TODO(flackr): Pass scale_factor to ResourceBundle to get best matching
- // image resource for the given scale factor.
- return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
+ ui::ScaleFactor scale_factor) const {
+ return ResourceBundle::GetSharedInstance().GetRawDataResource(
+ resource_id, scale_factor);
}
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698