summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.cc
Commit message (Collapse)AuthorAgeFilesLines
* GTK Themes: Make the location bar area look native.erg@google.com2009-07-161-2/+2
| | | | | | | | | | | | | | | | | Replace the star and go buttons with a native looking thing, where we manually draw the theme's button image for the full omnibox area and then position the star/go buttons on top of that. Also adds stand in versions of star_noborder and starred_noborder until Glen can make real icons. http://crbug.com/16227 http://crbug.com/13967 http://crbug.com/16915 Review URL: http://codereview.chromium.org/149681 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20914 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Tint throbbers like we tint all other buttons in the interface.erg@google.com2009-07-151-1/+1
| | | | | | | | | | | | | | Relanding with fixes for unit tests. Run through trybot this time... http://crbug.com/13967 Original Review URL: http://codereview.chromium.org/155588 TBR=estade Review URL: http://codereview.chromium.org/155601 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20809 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "GTK Themes: Tint throbbers like we tint all other buttons in the ↵erg@google.com2009-07-151-1/+1
| | | | | | | | | | | | interface." This reverts commit 3dfa509662e99282b5212490bfe19b32da357741 (r20799). TBR=estade Review URL: http://codereview.chromium.org/155598 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20802 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Tint throbbers like we tint all other buttons in the interface.erg@google.com2009-07-151-1/+1
| | | | | | | | http://crbug.com/13967 Review URL: http://codereview.chromium.org/155588 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20799 0039d316-1c4b-4281-b951-d872f2087c98
* Make our HSL shifting match Photoshop's.glen@chromium.org2009-07-151-7/+6
| | | | | | | | | | Also clean up a bunch of PMColor code - skia_utils should operate on SkColors and PMColors should only ever be used by SkBitmaps and ImageOperations. BUG=16687 Review URL: http://codereview.chromium.org/149663 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20788 0039d316-1c4b-4281-b951-d872f2087c98
* Make theme provider remember display properties settings and color's alpha.glen@chromium.org2009-07-151-4/+8
| | | | | | | | | BUG=15527 Review URL: http://codereview.chromium.org/155033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20703 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Refactored to use notifications instead of manual plumbing.erg@google.com2009-07-131-59/+72
| | | | | | | | | | | | - Removes large amounts of plumbing because: - All GtkChromeButtons are constructed from GtkThemeProvider which keeps a reference to all live buttons and sends them theme change notifications. - CustomDrawButtons now subscribe themselves to the BROWSER_THEME_CHANGED notification; this gets rid of a LOT of plubming. - Removes the GtkThemeProperties struct; just pass the theme provider around. - Move all the constants from the themes namespace to class statics, per tony's suggestion Review URL: http://codereview.chromium.org/149547 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20561 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Use the correct text color in the tab strip.erg@google.com2009-07-081-1/+1
| | | | | | | | BUG=http://crbug.com/13967 Review URL: http://codereview.chromium.org/155183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20102 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the current remaining Views-GTK compile and linker errors.brettw@chromium.org2009-07-061-2/+2
| | | | | | | | Chrome still doesn't run. Review URL: http://codereview.chromium.org/155026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19977 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Initial implementation of using GTK themes, partially based on evan's ↵erg@google.com2009-07-031-64/+82
| | | | | | | | | | | | | | | | | | | | | | | CL 118358. A lot of stuff works: - Colors are picked out of the GTK theme. - Buttons use the current GTK button theme. - We use the user's icon theme. A lot of stuff doesn't: - We could do a better job of picking colors for the skylines. - The omnibox hasn't been touched. - UI that's not part of the toolbar hasn't been touched. - We currently fail on themes like HighContrastInverse. TEST=Under Options>Personal Stuff, click GTK Theme. Colors and widgets should be rendered with the current GTK theme stuff. TEST=With chrome open and in GTK Theme mode, change your GTK theme or icon theme. chrome should pick up on the change immediately and reimport the colors and images. http://crbug.com/13967 Review URL: http://codereview.chromium.org/150176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19868 0039d316-1c4b-4281-b951-d872f2087c98
* Prefer arraysize() over sizeof().cmp@google.com2009-07-021-1/+1
| | | | | | | | | | | | | Fix a call to sizeof() on a static array to use arraysize() instead. Maybe fixes a coverity issue, too. BUG=none TEST=none Review URL: http://codereview.chromium.org/150202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19800 0039d316-1c4b-4281-b951-d872f2087c98
* Allow getting the theme tint as a value so that it can be applied ↵avi@chromium.org2009-07-011-25/+44
| | | | | | | | | | | 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
* Take 2 at fixing BrowserThemeProvider memory leaks.tc@google.com2009-06-301-11/+9
| | | | | | | | | This time, don't delete images in generated_images_ since we're now going to delete them in image_cache_. Review URL: http://codereview.chromium.org/151048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19601 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 19447.ericroman@google.com2009-06-271-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was causing interactive ui tests to fail with a crash: kernel32.dll!_InterlockedDecrement@4() > interactive_ui_tests.exe!sk_atomic_dec() Line 40 C++ interactive_ui_tests.exe!SkBitmap::MipMap::unref() Line 76 C++ interactive_ui_tests.exe!SkBitmap::freeMipMap() Line 367 C++ interactive_ui_tests.exe!SkBitmap::freePixels() Line 346 C++ interactive_ui_tests.exe!SkBitmap::~SkBitmap() Line 100 C++ interactive_ui_tests.exe!SkBitmap::`scalar deleting destructor'() C++ interactive_ui_tests.exe!BrowserThemeProvider::FreeImages() Line 744 C++ interactive_ui_tests.exe!BrowserThemeProvider::~BrowserThemeProvider() Line 141 C++ interactive_ui_tests.exe!BrowserThemeProvider::`scalar deleting destructor'() C++ interactive_ui_tests.exe!base::RefCounted<BrowserThemeProvider>::Release() Line 80 C++ interactive_ui_tests.exe!scoped_refptr<BrowserThemeProvider>::operator=() Line 209 C++ interactive_ui_tests.exe!ProfileImpl::~ProfileImpl() Line 584 C++ interactive_ui_tests.exe!ProfileImpl::`scalar deleting destructor'() C++ interactive_ui_tests.exe!ProfileManager::~ProfileManager() Line 57 C++ interactive_ui_tests.exe!ProfileManager::`scalar deleting destructor'() C++ interactive_ui_tests.exe!scoped_ptr<ProfileManager>::reset() Line 81 C++ interactive_ui_tests.exe!BrowserProcessImpl::~BrowserProcessImpl() Line 164 C++ interactive_ui_tests.exe!BrowserProcessImpl::`scalar deleting destructor'() C++ interactive_ui_tests.exe!browser_shutdown::Shutdown() Line 135 C++ interactive_ui_tests.exe!BrowserMain() Line 826 C++ interactive_ui_tests.exe!InProcessBrowserTest::SetUp() Line 129 C++ interactive_ui_tests.exe!testing::Test::Run() Line 2021 C++ interactive_ui_tests.exe!testing::internal::TestInfoImpl::Run() Line 2291 C++ interactive_ui_tests.exe!testing::internal::TestInfoImpl::RunTest() Line 656 C++ Review URL: http://codereview.chromium.org/147259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19454 0039d316-1c4b-4281-b951-d872f2087c98
* We're leaking almost all the theme bitmaps. Properly delete imagestc@google.com2009-06-271-6/+11
| | | | | | | | | | | | | | | when we create them. We have to copy images that come from ResourceBundle because ResourceBundle owns them. Valgrind still sees more leaks in this area, but I need to investigate some more and these are the biggies. Review URL: http://codereview.chromium.org/149112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19447 0039d316-1c4b-4281-b951-d872f2087c98
* Use regular notifications for theme changes.tc@google.com2009-06-261-4/+6
| | | | | | | | | | | | | This should have no impact on the current behavior. On linux, we'll want to get these notifications in a few places other than just the root browser windows so having it as a regular notification makes it easier for us to just listen for the event. Review URL: http://codereview.chromium.org/149032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19414 0039d316-1c4b-4281-b951-d872f2087c98
* Theme image support for the Mac.avi@chromium.org2009-06-221-36/+41
| | | | | | | | | 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-3/+12
| | | | | | | | | 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
* Add ability to theme our buttons.glen@chromium.org2009-06-041-60/+65
| | | | | | | | | BUG=12762 TEST=Verify that buttons can be themed. Review URL: http://codereview.chromium.org/119025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17586 0039d316-1c4b-4281-b951-d872f2087c98
* Headers cleanup in chrome/browser/phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | | | | - reduce header dependencies - miscellanous cleanups (add missing includes for OS_ defines etc) Further changesets may follow. I was only looking at header files up to character_encoding.h. Review URL: http://codereview.chromium.org/118072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17470 0039d316-1c4b-4281-b951-d872f2087c98
* Allow themes to change the background of the new tab page. Adds support for ↵glen@chromium.org2009-06-021-44/+177
| | | | | | | | | | | 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/+14
| | | | | | | | | | | 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
* Remove unused code from ExtensionsService.mpcomplete@google.com2009-05-261-1/+1
| | | | | | | | Move extension.* from browser to common, so it can be included by the utility process. Review URL: http://codereview.chromium.org/115716 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16880 0039d316-1c4b-4281-b951-d872f2087c98
* Make views/ depend only on images from app/resources.ben@chromium.org2009-05-211-0/+1
| | | | | | | | | | Trying this again. All compile issues should be addressed, ui and unit tests now pass. http://crbug.com/11387 Review URL: http://codereview.chromium.org/113690 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16677 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 16567.ben@chromium.org2009-05-211-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16575 0039d316-1c4b-4281-b951-d872f2087c98
* views/ should use resources from app/resources. Move dependent images to ↵ben@chromium.org2009-05-211-0/+1
| | | | | | | | | this location. http://crbug.com/11387 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16567 0039d316-1c4b-4281-b951-d872f2087c98
* Add GetPixbufNamed to ThemeProvider. GetPixbufNamed converts a loaded theme ↵jhawkins@chromium.org2009-05-201-0/+8
| | | | | | | | 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
* Track and free generated images in the browser theme provider.jhawkins@chromium.org2009-05-181-5/+17
| | | | | | Review URL: http://codereview.chromium.org/115478 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16311 0039d316-1c4b-4281-b951-d872f2087c98
* Convert uints to size_tsglen@chromium.org2009-05-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/115429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16209 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land of earlier NTP theme patch; now with mac and linux compatibility.glen@chromium.org2009-05-151-27/+54
| | | | | | Review URL: http://codereview.chromium.org/115413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16205 0039d316-1c4b-4281-b951-d872f2087c98
* Undo 16020glen@chromium.org2009-05-141-54/+27
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16021 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the new tab page to be themed (you may want to review DOMUIThemeSource ↵glen@chromium.org2009-05-141-27/+54
| | | | | | | | | | | | | as a whole and not just these changes). Change global std::strings to chars* in browser theme provider. Add ability for ReplaceStringPlaceHolder to take up to 9 replacements. BUG=11235,11685 Review URL: http://codereview.chromium.org/115172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16020 0039d316-1c4b-4281-b951-d872f2087c98
* Fix browser theme provider cache miss crash.glen@chromium.org2009-05-111-8/+7
| | | | | | | | BUG=11717 Review URL: http://codereview.chromium.org/113225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15796 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily revert char* to std::string because Linux and Mac are throwing ↵glen@chromium.org2009-05-091-17/+17
| | | | | | | | | | | | 'defined but not used' errors (the strings are used by themes). TBR=beng Review URL: http://codereview.chromium.org/113184 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15718 0039d316-1c4b-4281-b951-d872f2087c98
* Make 'reset theme' work.glen@chromium.org2009-05-091-31/+33
| | | | | | | | | GenerateFrameImages tweaking. Convert global std::strings to char* Review URL: http://codereview.chromium.org/115161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15717 0039d316-1c4b-4281-b951-d872f2087c98
* Some unnecessary painting and initing was being done.glen@chromium.org2009-05-091-9/+8
| | | | | | | | TBR=beng Review URL: http://codereview.chromium.org/113182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15714 0039d316-1c4b-4281-b951-d872f2087c98
* Random cleanups and stubs to get cross platform build going.glen@chromium.org2009-05-091-1/+1
| | | | | | | | TBR=beng Review URL: http://codereview.chromium.org/115158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15712 0039d316-1c4b-4281-b951-d872f2087c98
* To get things green:glen@chromium.org2009-05-091-1/+5
| | | | | | | | | | | - Add ifdef for filepath init (there is probably a better way of doing this). - Make Linux UI use active/inactive tabs instead of hover/OTR. TBR=beng Review URL: http://codereview.chromium.org/113180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15710 0039d316-1c4b-4281-b951-d872f2087c98
* This is the first pass at themes.glen@chromium.org2009-05-091-0/+527
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