OLD | NEW |
1 | 1 |
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 6 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 IDR_OMNIBOX_HISTORY_DARK, | 115 IDR_OMNIBOX_HISTORY_DARK, |
116 IDR_OMNIBOX_SEARCH, | 116 IDR_OMNIBOX_SEARCH, |
117 IDR_OMNIBOX_SEARCH_DARK, | 117 IDR_OMNIBOX_SEARCH_DARK, |
118 IDR_OMNIBOX_STAR, | 118 IDR_OMNIBOX_STAR, |
119 IDR_OMNIBOX_STAR_DARK, | 119 IDR_OMNIBOX_STAR_DARK, |
120 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, | 120 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, |
121 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, | 121 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, |
122 }; | 122 }; |
123 | 123 |
124 bool IsOverridableImage(int id) { | 124 bool IsOverridableImage(int id) { |
125 static std::set<int> images; | 125 CR_DEFINE_STATIC_LOCAL(std::set<int>, images, ()); |
126 if (images.empty()) { | 126 if (images.empty()) { |
127 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages)); | 127 images.insert(kThemeImages, kThemeImages + arraysize(kThemeImages)); |
128 images.insert(kAutocompleteImages, | 128 images.insert(kAutocompleteImages, |
129 kAutocompleteImages + arraysize(kAutocompleteImages)); | 129 kAutocompleteImages + arraysize(kAutocompleteImages)); |
130 | 130 |
131 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons(); | 131 const std::set<int>& buttons = ThemeService::GetTintableToolbarButtons(); |
132 images.insert(buttons.begin(), buttons.end()); | 132 images.insert(buttons.begin(), buttons.end()); |
133 } | 133 } |
134 | 134 |
135 return images.count(id) > 0; | 135 return images.count(id) > 0; |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 cairo_set_line_width(cr, 1.0); | 1238 cairo_set_line_width(cr, 1.0); |
1239 cairo_move_to(cr, start_x, widget->allocation.y); | 1239 cairo_move_to(cr, start_x, widget->allocation.y); |
1240 cairo_line_to(cr, start_x, | 1240 cairo_line_to(cr, start_x, |
1241 widget->allocation.y + widget->allocation.height); | 1241 widget->allocation.y + widget->allocation.height); |
1242 cairo_stroke(cr); | 1242 cairo_stroke(cr); |
1243 cairo_destroy(cr); | 1243 cairo_destroy(cr); |
1244 cairo_pattern_destroy(pattern); | 1244 cairo_pattern_destroy(pattern); |
1245 | 1245 |
1246 return TRUE; | 1246 return TRUE; |
1247 } | 1247 } |
OLD | NEW |