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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.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/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index fd46886d4a5dc804dd8875db2641461487ae40c3..034fc9f29b7c021cf852ae2f83ea4c8ad71b3d9d 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -45,6 +45,7 @@
#include "grit/theme_resources.h"
#include "ui/base/animation/animation.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/color_utils.h"
@@ -291,7 +292,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
static const base::StringPiece incognito_tab_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
- new_tab_html_idr));
+ new_tab_html_idr, ui::SCALE_FACTOR_NONE));
std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
incognito_tab_html, &localized_strings);
@@ -427,7 +428,8 @@ void NTPResourceCache::CreateNewTabHTML() {
// Load the new tab page appropriate for this build
base::StringPiece new_tab_html(ResourceBundle::GetSharedInstance().
- GetRawDataResource(IDR_NEW_TAB_4_HTML));
+ GetRawDataResource(IDR_NEW_TAB_4_HTML,
+ ui::SCALE_FACTOR_NONE));
jstemplate_builder::UseVersion2 version2;
std::string full_html =
jstemplate_builder::GetI18nTemplateHtml(new_tab_html, &load_time_data);
@@ -458,7 +460,7 @@ void NTPResourceCache::CreateNewTabIncognitoCSS() {
// Get our template.
static const base::StringPiece new_tab_theme_css(
ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_NEW_INCOGNITO_TAB_THEME_CSS));
+ IDR_NEW_INCOGNITO_TAB_THEME_CSS, ui::SCALE_FACTOR_NONE));
// Create the string from our template and the replacements.
std::string full_css = ReplaceStringPlaceholders(
@@ -553,7 +555,7 @@ void NTPResourceCache::CreateNewTabCSS() {
// Get our template.
static const base::StringPiece new_tab_theme_css(
ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_NEW_TAB_4_THEME_CSS));
+ IDR_NEW_TAB_4_THEME_CSS, ui::SCALE_FACTOR_NONE));
// Create the string from our template and the replacements.
std::string css_string;

Powered by Google App Engine
This is Rietveld 408576698