| 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);
|
|
|