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

Side by Side Diff: chrome/browser/browser_theme_provider_gtk.cc

Issue 151153: Allow getting the theme tint as a value so that it can be applied independent... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_theme_provider.cc ('k') | chrome/browser/browser_theme_provider_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser_theme_provider.h" 5 #include "chrome/browser/browser_theme_provider.h"
6 6
7 #include "base/gfx/gtk_util.h" 7 #include "base/gfx/gtk_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 GdkPixbuf* BrowserThemeProvider::GetPixbufNamed(int id) { 10 GdkPixbuf* BrowserThemeProvider::GetPixbufNamed(int id) {
(...skipping 23 matching lines...) Expand all
34 // This bitmap will be leaked, but this code should never be hit. 34 // This bitmap will be leaked, but this code should never be hit.
35 scoped_ptr<SkBitmap> skia_bitmap(new SkBitmap()); 35 scoped_ptr<SkBitmap> skia_bitmap(new SkBitmap());
36 skia_bitmap->setConfig(SkBitmap::kARGB_8888_Config, 32, 32); 36 skia_bitmap->setConfig(SkBitmap::kARGB_8888_Config, 32, 32);
37 skia_bitmap->allocPixels(); 37 skia_bitmap->allocPixels();
38 skia_bitmap->eraseARGB(255, 255, 0, 0); 38 skia_bitmap->eraseARGB(255, 255, 0, 0);
39 empty_bitmap = gfx::GdkPixbufFromSkBitmap(skia_bitmap.get()); 39 empty_bitmap = gfx::GdkPixbufFromSkBitmap(skia_bitmap.get());
40 } 40 }
41 return empty_bitmap; 41 return empty_bitmap;
42 } 42 }
43 43
44 void BrowserThemeProvider::FreePlatformImages() { 44 void BrowserThemeProvider::FreePlatformCaches() {
45 DCHECK(CalledOnValidThread()); 45 DCHECK(CalledOnValidThread());
46 46
47 // Free GdkPixbufs. 47 // Free GdkPixbufs.
48 for (GdkPixbufMap::iterator i = gdk_pixbufs_.begin(); 48 for (GdkPixbufMap::iterator i = gdk_pixbufs_.begin();
49 i != gdk_pixbufs_.end(); i++) { 49 i != gdk_pixbufs_.end(); i++) {
50 g_object_unref(i->second); 50 g_object_unref(i->second);
51 } 51 }
52 gdk_pixbufs_.clear(); 52 gdk_pixbufs_.clear();
53 } 53 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_theme_provider.cc ('k') | chrome/browser/browser_theme_provider_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698