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

Unified Diff: chrome/browser/browser_theme_provider.h

Issue 149741: Allow the tiling of theme background images on the NTP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_theme_provider.h
===================================================================
--- chrome/browser/browser_theme_provider.h (revision 20990)
+++ chrome/browser/browser_theme_provider.h (working copy)
@@ -56,6 +56,7 @@
// Strings used by themes to identify miscellaneous numerical properties.
static const char* kDisplayPropertyNTPAlignment;
+ static const char* kDisplayPropertyNTPTiling;
// Strings used in alignment properties.
static const char* kAlignmentTop;
@@ -63,6 +64,12 @@
static const char* kAlignmentLeft;
static const char* kAlignmentRight;
+ // Strings used in tiling properties.
+ static const char* kTilingNoRepeat;
+ static const char* kTilingRepeatX;
+ static const char* kTilingRepeatY;
+ static const char* kTilingRepeat;
+
// Default colors.
static const SkColor kDefaultColorFrame;
static const SkColor kDefaultColorFrameInactive;
@@ -115,7 +122,8 @@
TINT_FRAME_INCOGNITO,
TINT_FRAME_INCOGNITO_INACTIVE,
TINT_BACKGROUND_TAB,
- NTP_BACKGROUND_ALIGNMENT
+ NTP_BACKGROUND_ALIGNMENT,
+ NTP_BACKGROUND_TILING
};
// A bitfield mask for alignments.
@@ -127,8 +135,16 @@
ALIGN_BOTTOM = 0x8,
} AlignmentMasks;
- virtual void Init(Profile* profile);
+ // Background tiling choices.
+ enum {
+ NO_REPEAT = 0,
+ REPEAT_X = 1,
+ REPEAT_Y = 2,
+ REPEAT = 3
+ } Tiling;
+ void Init(Profile* profile);
+
// ThemeProvider implementation.
virtual SkBitmap* GetBitmapNamed(int id);
virtual SkColor GetColor(int id);
@@ -161,6 +177,13 @@
// AlignmentMasks
static int StringToAlignment(const std::string &alignment);
+ // Convert a tiling value into a string like "no-repeat". Public
+ // so that it can be used to generate CSS values. Takes a Tiling.
+ static std::string TilingToString(int tiling);
+
+ // Parse tiling values from something like "no-repeat" into a Tiling value.
+ static int StringToTiling(const std::string &tiling);
+
protected:
// Sets an individual color value.
void SetColor(const char* id, const SkColor& color);
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698