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

Side by Side Diff: chrome/browser/ui/libgtkui/gtk_util.cc

Issue 2628043002: Gtk3: Render a GtkHeaderBar as the background of the tab strip (Closed)
Patch Set: Handle incognito Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/libgtkui/gtk_util.h" 5 #include "chrome/browser/ui/libgtkui/gtk_util.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #include <gdk/gdkx.h> 9 #include <gdk/gdkx.h>
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 static void* gtk3lib = dlopen("libgtk-3.so.0", RTLD_LAZY); 58 static void* gtk3lib = dlopen("libgtk-3.so.0", RTLD_LAZY);
59 DCHECK(gtk3lib); 59 DCHECK(gtk3lib);
60 return gtk3lib; 60 return gtk3lib;
61 } 61 }
62 #endif 62 #endif
63 63
64 } // namespace 64 } // namespace
65 65
66 namespace libgtkui { 66 namespace libgtkui {
67 67
68 // TODO(erg): ThemeService has a whole interface just for reading default
69 // constants. Figure out what to do with that more long term; for now, just
70 // copy the constants themselves here.
71 const color_utils::HSL kDefaultTintFrameIncognito = {-1, 0.2f, 0.35f};
72 const color_utils::HSL kDefaultTintFrameIncognitoInactive = {-1, 0.3f, 0.6f};
73
68 // Theme colors returned by GetSystemColor(). 74 // Theme colors returned by GetSystemColor().
69 const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128); 75 const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
70 const SkColor kURLTextColor = SkColorSetRGB(0x0b, 0x80, 0x43); 76 const SkColor kURLTextColor = SkColorSetRGB(0x0b, 0x80, 0x43);
71 77
72 SkColor NormalURLColor(SkColor foreground) { 78 SkColor NormalURLColor(SkColor foreground) {
73 color_utils::HSL fg_hsl, hue_hsl; 79 color_utils::HSL fg_hsl, hue_hsl;
74 color_utils::SkColorToHSL(foreground, &fg_hsl); 80 color_utils::SkColorToHSL(foreground, &fg_hsl);
75 color_utils::SkColorToHSL(kURLTextColor, &hue_hsl); 81 color_utils::SkColorToHSL(kURLTextColor, &hue_hsl);
76 82
77 // Only allow colors that have a fair amount of saturation in them (color vs 83 // Only allow colors that have a fair amount of saturation in them (color vs
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 444
439 AddBorders(context); 445 AddBorders(context);
440 PixelSurface surface; 446 PixelSurface surface;
441 RenderBackground(surface.cairo(), context); 447 RenderBackground(surface.cairo(), context);
442 gtk_render_frame(context, surface.cairo(), 0, 0, 1, 1); 448 gtk_render_frame(context, surface.cairo(), 0, 0, 1, 1);
443 return surface.GetPixelValue(); 449 return surface.GetPixelValue();
444 } 450 }
445 #endif 451 #endif
446 452
447 } // namespace libgtkui 453 } // namespace libgtkui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698