OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/gtk/gtk_theme_provider.h" | 5 #include "chrome/browser/ui/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/resource_bundle.h" | |
12 #include "base/environment.h" | 11 #include "base/environment.h" |
13 #include "base/nix/xdg_util.h" | 12 #include "base/nix/xdg_util.h" |
14 #include "base/stl_util-inl.h" | 13 #include "base/stl_util-inl.h" |
15 #include "chrome/browser/metrics/user_metrics.h" | 14 #include "chrome/browser/metrics/user_metrics.h" |
16 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" | 17 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" |
19 #include "chrome/browser/ui/gtk/chrome_gtk_frame.h" | 18 #include "chrome/browser/ui/gtk/chrome_gtk_frame.h" |
20 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" | 19 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" |
21 #include "chrome/browser/ui/gtk/gtk_util.h" | 20 #include "chrome/browser/ui/gtk/gtk_util.h" |
22 #include "chrome/browser/ui/gtk/hover_controller_gtk.h" | 21 #include "chrome/browser/ui/gtk/hover_controller_gtk.h" |
23 #include "chrome/common/notification_details.h" | 22 #include "chrome/common/notification_details.h" |
24 #include "chrome/common/notification_service.h" | 23 #include "chrome/common/notification_service.h" |
25 #include "chrome/common/notification_source.h" | 24 #include "chrome/common/notification_source.h" |
26 #include "chrome/common/notification_type.h" | 25 #include "chrome/common/notification_type.h" |
27 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
28 #include "gfx/canvas_skia.h" | 27 #include "gfx/canvas_skia.h" |
29 #include "gfx/color_utils.h" | 28 #include "gfx/color_utils.h" |
30 #include "gfx/gtk_util.h" | 29 #include "gfx/gtk_util.h" |
31 #include "gfx/skbitmap_operations.h" | 30 #include "gfx/skbitmap_operations.h" |
32 #include "gfx/skia_util.h" | 31 #include "gfx/skia_util.h" |
33 #include "gfx/skia_utils_gtk.h" | 32 #include "gfx/skia_utils_gtk.h" |
34 #include "grit/app_resources.h" | 33 #include "grit/app_resources.h" |
35 #include "grit/theme_resources.h" | 34 #include "grit/theme_resources.h" |
36 #include "third_party/skia/include/core/SkBitmap.h" | 35 #include "third_party/skia/include/core/SkBitmap.h" |
37 #include "third_party/skia/include/core/SkCanvas.h" | 36 #include "third_party/skia/include/core/SkCanvas.h" |
38 #include "third_party/skia/include/core/SkColor.h" | 37 #include "third_party/skia/include/core/SkColor.h" |
39 #include "third_party/skia/include/core/SkShader.h" | 38 #include "third_party/skia/include/core/SkShader.h" |
40 #include "ui/base/gtk/gtk_signal_registrar.h" | 39 #include "ui/base/gtk/gtk_signal_registrar.h" |
| 40 #include "ui/base/resource/resource_bundle.h" |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 // The size of the rendered toolbar image. | 44 // The size of the rendered toolbar image. |
45 const int kToolbarImageWidth = 64; | 45 const int kToolbarImageWidth = 64; |
46 const int kToolbarImageHeight = 128; | 46 const int kToolbarImageHeight = 128; |
47 | 47 |
48 // How much to tint the GTK+ color lighter at the top of the window. | 48 // How much to tint the GTK+ color lighter at the top of the window. |
49 const color_utils::HSL kGtkFrameShift = { -1, -1, 0.58 }; | 49 const color_utils::HSL kGtkFrameShift = { -1, -1, 0.58 }; |
50 | 50 |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 cairo_set_line_width(cr, 1.0); | 1119 cairo_set_line_width(cr, 1.0); |
1120 cairo_move_to(cr, start_x, widget->allocation.y); | 1120 cairo_move_to(cr, start_x, widget->allocation.y); |
1121 cairo_line_to(cr, start_x, | 1121 cairo_line_to(cr, start_x, |
1122 widget->allocation.y + widget->allocation.height); | 1122 widget->allocation.y + widget->allocation.height); |
1123 cairo_stroke(cr); | 1123 cairo_stroke(cr); |
1124 cairo_destroy(cr); | 1124 cairo_destroy(cr); |
1125 cairo_pattern_destroy(pattern); | 1125 cairo_pattern_destroy(pattern); |
1126 | 1126 |
1127 return TRUE; | 1127 return TRUE; |
1128 } | 1128 } |
OLD | NEW |