| OLD | NEW |
| 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_ui.h" | 5 #include "chrome/browser/ui/libgtkui/gtk_ui.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <pango/pango.h> | 8 #include <pango/pango.h> |
| 9 #include <X11/Xcursor/Xcursor.h> | 9 #include <X11/Xcursor/Xcursor.h> |
| 10 | 10 |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 | 924 |
| 925 temp_color = color_utils::HSLShift(frame_color, kDefaultTintFrameIncognito); | 925 temp_color = color_utils::HSLShift(frame_color, kDefaultTintFrameIncognito); |
| 926 GetChromeStyleColor("incognito-frame-color", &temp_color); | 926 GetChromeStyleColor("incognito-frame-color", &temp_color); |
| 927 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO] = temp_color; | 927 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO] = temp_color; |
| 928 | 928 |
| 929 temp_color = | 929 temp_color = |
| 930 color_utils::HSLShift(frame_color, kDefaultTintFrameIncognitoInactive); | 930 color_utils::HSLShift(frame_color, kDefaultTintFrameIncognitoInactive); |
| 931 GetChromeStyleColor("incognito-inactive-frame-color", &temp_color); | 931 GetChromeStyleColor("incognito-inactive-frame-color", &temp_color); |
| 932 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE] = temp_color; | 932 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE] = temp_color; |
| 933 #else | 933 #else |
| 934 // TODO(thomasanderson): Render a GtkHeaderBar directly. | |
| 935 SkColor color_frame = GetBgColor("#headerbar.header-bar.titlebar"); | 934 SkColor color_frame = GetBgColor("#headerbar.header-bar.titlebar"); |
| 936 SkColor color_frame_inactive = | 935 SkColor color_frame_inactive = |
| 937 GetBgColor("#headerbar.header-bar.titlebar:backdrop"); | 936 GetBgColor("#headerbar.header-bar.titlebar:backdrop"); |
| 938 colors_[ThemeProperties::COLOR_FRAME] = color_frame; | 937 colors_[ThemeProperties::COLOR_FRAME] = color_frame; |
| 939 colors_[ThemeProperties::COLOR_FRAME_INACTIVE] = color_frame_inactive; | 938 colors_[ThemeProperties::COLOR_FRAME_INACTIVE] = color_frame_inactive; |
| 940 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO] = | 939 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO] = |
| 941 color_utils::HSLShift(color_frame, kDefaultTintFrameIncognito); | 940 color_utils::HSLShift(color_frame, kDefaultTintFrameIncognito); |
| 942 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE] = | 941 colors_[ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE] = |
| 943 color_utils::HSLShift(color_frame_inactive, kDefaultTintFrameIncognito); | 942 color_utils::HSLShift(color_frame_inactive, kDefaultTintFrameIncognito); |
| 944 #endif | 943 #endif |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 | 1052 |
| 1054 float GtkUi::GetDeviceScaleFactor() const { | 1053 float GtkUi::GetDeviceScaleFactor() const { |
| 1055 return device_scale_factor_; | 1054 return device_scale_factor_; |
| 1056 } | 1055 } |
| 1057 | 1056 |
| 1058 } // namespace libgtkui | 1057 } // namespace libgtkui |
| 1059 | 1058 |
| 1060 views::LinuxUI* BuildGtkUi() { | 1059 views::LinuxUI* BuildGtkUi() { |
| 1061 return new libgtkui::GtkUi; | 1060 return new libgtkui::GtkUi; |
| 1062 } | 1061 } |
| OLD | NEW |