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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 2456193003: NTPResourceCache don't add substitution for colorSectionBorder twice (Closed)
Patch Set: remove unused .thumbnail-wrapper style Created 4 years, 1 month 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 | « chrome/browser/resources/ntp4/new_tab_theme.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // Cache-buster for background. 569 // Cache-buster for background.
570 substitutions["themeId"] = 570 substitutions["themeId"] =
571 profile_->GetPrefs()->GetString(prefs::kCurrentThemeID); 571 profile_->GetPrefs()->GetString(prefs::kCurrentThemeID);
572 572
573 // Colors. 573 // Colors.
574 substitutions["colorBackground"] = SkColorToRGBAString(color_background); 574 substitutions["colorBackground"] = SkColorToRGBAString(color_background);
575 substitutions["backgroundBarDetached"] = GetNewTabBackgroundCSS(tp, false); 575 substitutions["backgroundBarDetached"] = GetNewTabBackgroundCSS(tp, false);
576 substitutions["backgroundBarAttached"] = GetNewTabBackgroundCSS(tp, true); 576 substitutions["backgroundBarAttached"] = GetNewTabBackgroundCSS(tp, true);
577 substitutions["backgroundTiling"] = GetNewTabBackgroundTilingCSS(tp); 577 substitutions["backgroundTiling"] = GetNewTabBackgroundTilingCSS(tp);
578 substitutions["colorTextRgba"] = SkColorToRGBAString(color_text); 578 substitutions["colorTextRgba"] = SkColorToRGBAString(color_text);
579 substitutions["colorSectionBorder"] =
580 SkColorToRGBAString(color_section_border);
581 substitutions["colorTextLight"] = SkColorToRGBAString(color_text_light); 579 substitutions["colorTextLight"] = SkColorToRGBAString(color_text_light);
582 substitutions["colorSectionBorder"] = 580 substitutions["colorSectionBorder"] =
583 SkColorToRGBComponents(color_section_border); 581 SkColorToRGBComponents(color_section_border);
584 substitutions["colorText"] = SkColorToRGBComponents(color_text); 582 substitutions["colorText"] = SkColorToRGBComponents(color_text);
585 583
586 // For themes that right-align the background, we flip the attribution to the 584 // For themes that right-align the background, we flip the attribution to the
587 // left to avoid conflicts. 585 // left to avoid conflicts.
588 int alignment = 586 int alignment =
589 tp.GetDisplayProperty(ThemeProperties::NTP_BACKGROUND_ALIGNMENT); 587 tp.GetDisplayProperty(ThemeProperties::NTP_BACKGROUND_ALIGNMENT);
590 if (alignment & ThemeProperties::ALIGN_RIGHT) { 588 if (alignment & ThemeProperties::ALIGN_RIGHT) {
(...skipping 12 matching lines...) Expand all
603 // Get our template. 601 // Get our template.
604 static const base::StringPiece new_tab_theme_css( 602 static const base::StringPiece new_tab_theme_css(
605 ResourceBundle::GetSharedInstance().GetRawDataResource( 603 ResourceBundle::GetSharedInstance().GetRawDataResource(
606 IDR_NEW_TAB_4_THEME_CSS)); 604 IDR_NEW_TAB_4_THEME_CSS));
607 605
608 // Create the string from our template and the replacements. 606 // Create the string from our template and the replacements.
609 std::string css_string = 607 std::string css_string =
610 ui::ReplaceTemplateExpressions(new_tab_theme_css, substitutions); 608 ui::ReplaceTemplateExpressions(new_tab_theme_css, substitutions);
611 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 609 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
612 } 610 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab_theme.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698