| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/gtk_theme_provider.h" | 5 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "app/gtk_signal_registrar.h" | 11 #include "app/gtk_signal_registrar.h" |
| 12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
| 13 #include "base/environment.h" | 13 #include "base/environment.h" |
| 14 #include "base/stl_util-inl.h" | 14 #include "base/stl_util-inl.h" |
| 15 #include "base/xdg_util.h" | 15 #include "base/xdg_util.h" |
| 16 #include "chrome/browser/gtk/cairo_cached_surface.h" |
| 17 #include "chrome/browser/gtk/gtk_chrome_button.h" |
| 18 #include "chrome/browser/gtk/hover_controller_gtk.h" |
| 19 #include "chrome/browser/gtk/meta_frames.h" |
| 16 #include "chrome/browser/metrics/user_metrics.h" | 20 #include "chrome/browser/metrics/user_metrics.h" |
| 21 #include "chrome/browser/prefs/pref_service.h" |
| 17 #include "chrome/browser/profile.h" | 22 #include "chrome/browser/profile.h" |
| 18 #include "chrome/browser/gtk/cairo_cached_surface.h" | |
| 19 #include "chrome/browser/gtk/hover_controller_gtk.h" | |
| 20 #include "chrome/browser/gtk/gtk_chrome_button.h" | |
| 21 #include "chrome/browser/gtk/meta_frames.h" | |
| 22 #include "chrome/browser/pref_service.h" | |
| 23 #include "chrome/common/pref_names.h" | |
| 24 #include "chrome/common/notification_details.h" | 23 #include "chrome/common/notification_details.h" |
| 25 #include "chrome/common/notification_service.h" | 24 #include "chrome/common/notification_service.h" |
| 26 #include "chrome/common/notification_source.h" | 25 #include "chrome/common/notification_source.h" |
| 27 #include "chrome/common/notification_type.h" | 26 #include "chrome/common/notification_type.h" |
| 27 #include "chrome/common/pref_names.h" |
| 28 #include "gfx/color_utils.h" | 28 #include "gfx/color_utils.h" |
| 29 #include "gfx/gtk_util.h" |
| 29 #include "gfx/skbitmap_operations.h" | 30 #include "gfx/skbitmap_operations.h" |
| 30 #include "gfx/skia_utils_gtk.h" | 31 #include "gfx/skia_utils_gtk.h" |
| 32 #include "grit/app_resources.h" |
| 33 #include "grit/theme_resources.h" |
| 31 #include "third_party/skia/include/core/SkBitmap.h" | 34 #include "third_party/skia/include/core/SkBitmap.h" |
| 32 #include "third_party/skia/include/core/SkCanvas.h" | 35 #include "third_party/skia/include/core/SkCanvas.h" |
| 33 #include "third_party/skia/include/core/SkColor.h" | 36 #include "third_party/skia/include/core/SkColor.h" |
| 34 #include "gfx/gtk_util.h" | |
| 35 #include "grit/app_resources.h" | |
| 36 #include "grit/theme_resources.h" | |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // The size of the rendered toolbar image. | 40 // The size of the rendered toolbar image. |
| 41 const int kToolbarImageWidth = 64; | 41 const int kToolbarImageWidth = 64; |
| 42 const int kToolbarImageHeight = 128; | 42 const int kToolbarImageHeight = 128; |
| 43 | 43 |
| 44 const color_utils::HSL kExactColor = { -1, -1, -1 }; | 44 const color_utils::HSL kExactColor = { -1, -1, -1 }; |
| 45 | 45 |
| 46 const color_utils::HSL kDefaultFrameShift = { -1, -1, 0.4 }; | 46 const color_utils::HSL kDefaultFrameShift = { -1, -1, 0.4 }; |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 cairo_set_line_width(cr, 1.0); | 1047 cairo_set_line_width(cr, 1.0); |
| 1048 cairo_move_to(cr, start_x, widget->allocation.y); | 1048 cairo_move_to(cr, start_x, widget->allocation.y); |
| 1049 cairo_line_to(cr, start_x, | 1049 cairo_line_to(cr, start_x, |
| 1050 widget->allocation.y + widget->allocation.height); | 1050 widget->allocation.y + widget->allocation.height); |
| 1051 cairo_stroke(cr); | 1051 cairo_stroke(cr); |
| 1052 cairo_destroy(cr); | 1052 cairo_destroy(cr); |
| 1053 cairo_pattern_destroy(pattern); | 1053 cairo_pattern_destroy(pattern); |
| 1054 | 1054 |
| 1055 return TRUE; | 1055 return TRUE; |
| 1056 } | 1056 } |
| OLD | NEW |