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

Side by Side Diff: trunk/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 276773004: Revert 269892 "linux_aura: Compile ash into chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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/libgtk2ui/gtk2_ui.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // 113 //
114 // Default tints. 114 // Default tints.
115 const color_utils::HSL kDefaultTintButtons = { -1, -1, -1 }; 115 const color_utils::HSL kDefaultTintButtons = { -1, -1, -1 };
116 const color_utils::HSL kDefaultTintFrame = { -1, -1, -1 }; 116 const color_utils::HSL kDefaultTintFrame = { -1, -1, -1 };
117 const color_utils::HSL kDefaultTintFrameInactive = { -1, -1, 0.75f }; 117 const color_utils::HSL kDefaultTintFrameInactive = { -1, -1, 0.75f };
118 const color_utils::HSL kDefaultTintFrameIncognito = { -1, 0.2f, 0.35f }; 118 const color_utils::HSL kDefaultTintFrameIncognito = { -1, 0.2f, 0.35f };
119 const color_utils::HSL kDefaultTintFrameIncognitoInactive = { -1, 0.3f, 0.6f }; 119 const color_utils::HSL kDefaultTintFrameIncognitoInactive = { -1, 0.3f, 0.6f };
120 const color_utils::HSL kDefaultTintBackgroundTab = { -1, 0.5, 0.75 }; 120 const color_utils::HSL kDefaultTintBackgroundTab = { -1, 0.5, 0.75 };
121 121
122 // A list of images that we provide while in gtk mode. 122 // A list of images that we provide while in gtk mode.
123 //
124 // TODO(erg): We list both the normal and *_DESKTOP versions of some of these
125 // images because in some contexts, we don't go through the
126 // chrome::MapThemeImage interface. That should be fixed, but tracking that
127 // down is Hard.
128 const int kThemeImages[] = { 123 const int kThemeImages[] = {
129 IDR_THEME_TOOLBAR, 124 IDR_THEME_TOOLBAR,
130 IDR_THEME_TAB_BACKGROUND, 125 IDR_THEME_TAB_BACKGROUND,
131 IDR_THEME_TAB_BACKGROUND_DESKTOP,
132 IDR_THEME_TAB_BACKGROUND_INCOGNITO, 126 IDR_THEME_TAB_BACKGROUND_INCOGNITO,
133 IDR_THEME_TAB_BACKGROUND_INCOGNITO_DESKTOP,
134 IDR_FRAME, 127 IDR_FRAME,
135 IDR_FRAME_INACTIVE, 128 IDR_FRAME_INACTIVE,
136 IDR_THEME_FRAME, 129 IDR_THEME_FRAME,
137 IDR_THEME_FRAME_INACTIVE, 130 IDR_THEME_FRAME_INACTIVE,
138 IDR_THEME_FRAME_INCOGNITO, 131 IDR_THEME_FRAME_INCOGNITO,
139 IDR_THEME_FRAME_INCOGNITO_INACTIVE, 132 IDR_THEME_FRAME_INCOGNITO_INACTIVE,
140 }; 133 };
141 134
142 // A list of icons used in the autocomplete view that should be tinted to the 135 // A list of icons used in the autocomplete view that should be tinted to the
143 // current gtk theme selection color so they stand out against the GtkEntry's 136 // current gtk theme selection color so they stand out against the GtkEntry's
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 GdkColor* color = &style->bg[GTK_STATE_NORMAL]; 1033 GdkColor* color = &style->bg[GTK_STATE_NORMAL];
1041 SkBitmap bitmap; 1034 SkBitmap bitmap;
1042 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 1035 bitmap.setConfig(SkBitmap::kARGB_8888_Config,
1043 kToolbarImageWidth, kToolbarImageHeight); 1036 kToolbarImageWidth, kToolbarImageHeight);
1044 bitmap.allocPixels(); 1037 bitmap.allocPixels();
1045 bitmap.eraseARGB(0xff, color->red >> 8, color->green >> 8, 1038 bitmap.eraseARGB(0xff, color->red >> 8, color->green >> 8,
1046 color->blue >> 8); 1039 color->blue >> 8);
1047 return bitmap; 1040 return bitmap;
1048 } 1041 }
1049 case IDR_THEME_TAB_BACKGROUND: 1042 case IDR_THEME_TAB_BACKGROUND:
1050 case IDR_THEME_TAB_BACKGROUND_DESKTOP:
1051 return GenerateTabImage(IDR_THEME_FRAME); 1043 return GenerateTabImage(IDR_THEME_FRAME);
1052 case IDR_THEME_TAB_BACKGROUND_INCOGNITO: 1044 case IDR_THEME_TAB_BACKGROUND_INCOGNITO:
1053 case IDR_THEME_TAB_BACKGROUND_INCOGNITO_DESKTOP:
1054 return GenerateTabImage(IDR_THEME_FRAME_INCOGNITO); 1045 return GenerateTabImage(IDR_THEME_FRAME_INCOGNITO);
1055 case IDR_FRAME: 1046 case IDR_FRAME:
1056 case IDR_THEME_FRAME: 1047 case IDR_THEME_FRAME:
1057 return GenerateFrameImage(ThemeProperties::COLOR_FRAME, 1048 return GenerateFrameImage(ThemeProperties::COLOR_FRAME,
1058 "frame-gradient-color"); 1049 "frame-gradient-color");
1059 case IDR_FRAME_INACTIVE: 1050 case IDR_FRAME_INACTIVE:
1060 case IDR_THEME_FRAME_INACTIVE: 1051 case IDR_THEME_FRAME_INACTIVE:
1061 return GenerateFrameImage(ThemeProperties::COLOR_FRAME_INACTIVE, 1052 return GenerateFrameImage(ThemeProperties::COLOR_FRAME_INACTIVE,
1062 "inactive-frame-gradient-color"); 1053 "inactive-frame-gradient-color");
1063 case IDR_THEME_FRAME_INCOGNITO: 1054 case IDR_THEME_FRAME_INCOGNITO:
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 ClearAllThemeData(); 1383 ClearAllThemeData();
1393 LoadGtkValues(); 1384 LoadGtkValues();
1394 NativeThemeGtk2::instance()->NotifyObservers(); 1385 NativeThemeGtk2::instance()->NotifyObservers();
1395 } 1386 }
1396 1387
1397 } // namespace libgtk2ui 1388 } // namespace libgtk2ui
1398 1389
1399 views::LinuxUI* BuildGtk2UI() { 1390 views::LinuxUI* BuildGtk2UI() {
1400 return new libgtk2ui::Gtk2UI; 1391 return new libgtk2ui::Gtk2UI;
1401 } 1392 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698