summaryrefslogtreecommitdiffstats
path: root/app/theme_provider.h
Commit message (Collapse)AuthorAgeFilesLines
* First fix to minimize copying of image data.erg@google.com2009-10-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first of multiple patches that clean up handling of memory regarding images. Previously, the code did several memcpy()s or equivalents. This change: - Creates an abstract interface RefCountedMemory which provides access to the front() of a memory range and the size() of it. It is a RefCountedThreadSafe. - Adds a RefCountedStaticMemory class which isa RefCountedMemory. - Pushes RefCountedBytes up into base/ from chrome/ and make it conform to RefCountedMemory. - Have ResourceBundle return RefCountedStaticMemory to the mmaped() or DLL loaded resources instead of memcpy()ing them. - General cleanups to minimize copies in constructing RefCountedBytes. - Use the above consistent interface in the BrowserThemeProvider, along with special casing the loading of the new tab page background. This patch is mostly cleanups and there should only be a slight performance gain if any. Most of the real speedups should come in subsequent patches. BUG=http://crbug.com/24493 TEST=Slightly faster on Perf bot; does not introduce crashes. Review URL: http://codereview.chromium.org/288005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29412 0039d316-1c4b-4281-b951-d872f2087c98
* Make the ThemeProvider methods const.pkasting@chromium.org2009-10-131-11/+12
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/266037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28868 0039d316-1c4b-4281-b951-d872f2087c98
* Allow theming of colors for the Mac.avi@chromium.org2009-08-111-1/+7
| | | | | | | | | BUG=http://crbug.com/18438 TEST=none Review URL: http://codereview.chromium.org/162010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23023 0039d316-1c4b-4281-b951-d872f2087c98
* Make the DOMUIThemeSource load and pass through a PNG, rather than relying ↵glen@chromium.org2009-08-051-0/+6
| | | | | | | | | | | on decode/encode. BUG=18427 TEST=Install a giant theme, load the NNTP, verify that you can type in the omnibox without delay while the page is loading. Review URL: http://codereview.chromium.org/159891 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22457 0039d316-1c4b-4281-b951-d872f2087c98
* Fix native GTK interface.erg@chromium.org2009-07-191-0/+4
| | | | | | | | | | | In r21039, BrowserThemeProvider::Init was made non-virtual, which meant that GtkBrowserThemeProvider::Init was never being called. Make it virtual again (so the linux UI renders properly), and explicitly add Init() to the ThemeProvider interface so this doesn't happen again. Review URL: http://codereview.chromium.org/155754 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21066 0039d316-1c4b-4281-b951-d872f2087c98
* Restore RTL icons to CustomDrawButtonBase.tc@google.com2009-07-131-0/+3
| | | | | | | | | | Since moving from ResourceBundle to ThemeProvider, we needed to plumb through GetRTLEnabledPixbufNamed in ThemeProvider. Review URL: http://codereview.chromium.org/149483 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20568 0039d316-1c4b-4281-b951-d872f2087c98
* Allow getting the theme tint as a value so that it can be applied ↵avi@chromium.org2009-07-011-3/+9
| | | | | | | | | | | independent of the theme provider. Since the Mac needs it to tint its vector resources it's added to the Mac. BUG=none TEST=none Review URL: http://codereview.chromium.org/151153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19751 0039d316-1c4b-4281-b951-d872f2087c98
* Theme image support for the Mac.avi@chromium.org2009-06-221-2/+16
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/140007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18925 0039d316-1c4b-4281-b951-d872f2087c98
* More theme bits for the NTP and window frame.glen@chromium.org2009-06-051-0/+4
| | | | | | | | | BUG=12768,13352 TEST=Verify that a theme with attribution works on the NTP and a theme with an overlay shows up Review URL: http://codereview.chromium.org/119227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17773 0039d316-1c4b-4281-b951-d872f2087c98
* Allow themes to change the background of the new tab page. Adds support for ↵glen@chromium.org2009-06-021-0/+4
| | | | | | | | | | | display properties to themes (stored internally as ints/enums, but parsed from text). BUG=12768 TEST=Install a theme with an new tab page background and verify that the background appears on the new tab page. Review URL: http://codereview.chromium.org/115910 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17431 0039d316-1c4b-4281-b951-d872f2087c98
* Use the right frame type on startup, do proper swapping of frames when ↵glen@chromium.org2009-05-311-0/+4
| | | | | | | | | | | themes change. Leave the native frame decision up to the ThemeProvider. BUG=12890 TEST=In Aero, unstall a theme, reset to default, install again, restart, reset theme to default. Make sure that the Aero frame changes to the themed frame and back again appropriately. Review URL: http://codereview.chromium.org/118053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17301 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes couple of bugs that occur now that we can actually run views onsky@chromium.org2009-05-291-1/+1
| | | | | | | | | | | gtk again. BUG=none TEST=none TBR=ben Review URL: http://codereview.chromium.org/115961 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17261 0039d316-1c4b-4281-b951-d872f2087c98
* Add GetPixbufNamed to ThemeProvider. GetPixbufNamed converts a loaded theme ↵jhawkins@chromium.org2009-05-201-0/+17
| | | | | | | | bitmap to a GdkPixbuf and caches the image so ThemeProvider users don't need to release them ala ResourceBundle::GetPixbufNamed. Review URL: http://codereview.chromium.org/113626 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16520 0039d316-1c4b-4281-b951-d872f2087c98
* This CL updates chrome to the latest version of skia, retrieved via DEPS, andsenorblanco@chromium.org2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | placed in third_party. All relevant skia changes (for all 3 platforms) have been upstreamed. Most of this CL is mind-numbingly repetitive. Things of interest are: skia.gyp (now points at third_party versions), DEPS, and SkUserConfig.h. stdint.h: Skia now requires C99 integer types, which MSVC doesn't support natively. I have put typedefs in config/win/stdint.h. Note that the new version of skia appears to render rects whose coordinates are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled. There were a couple obvious instances of this in the code which I fixed, but there may be more. There were ~35 layout test failures due to minor pixel differences which I rebaselined on Windows and Linux, and 8 genuine failures related to masks and stroked text, which I have put in text_expectations.txt and assigned to myself. (There was another change which broke ~1700 tests on each platform, but I put that change behind an #ifdef for now). R=brettw Review URL: http://codereview.chromium.org/65012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
* This is the first pass at themes.glen@chromium.org2009-05-091-0/+33
This CL is paired with http://codereview.chromium.org/67284 This CL (for commit purposes) includes http://codereview.chromium.org/67284 BUG=4463,11232,11233,11234,11235 Review URL: http://codereview.chromium.org/99030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15704 0039d316-1c4b-4281-b951-d872f2087c98