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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.h

Issue 1878943002: Revert of Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int* style_out, 66 int* style_out,
67 gfx::FontRenderParams* params_out) const override; 67 gfx::FontRenderParams* params_out) const override;
68 68
69 // ui::ShellDialogLinux: 69 // ui::ShellDialogLinux:
70 ui::SelectFileDialog* CreateSelectFileDialog( 70 ui::SelectFileDialog* CreateSelectFileDialog(
71 ui::SelectFileDialog::Listener* listener, 71 ui::SelectFileDialog::Listener* listener,
72 ui::SelectFilePolicy* policy) const override; 72 ui::SelectFilePolicy* policy) const override;
73 73
74 // ui::LinuxUI: 74 // ui::LinuxUI:
75 void Initialize() override; 75 void Initialize() override;
76 // TODO(varkha): This should not be necessary once Material Design is on
77 // unconditionally.
78 void MaterialDesignControllerReady() override;
79 gfx::Image GetThemeImageNamed(int id) const override; 76 gfx::Image GetThemeImageNamed(int id) const override;
80 bool GetTint(int id, color_utils::HSL* tint) const override; 77 bool GetTint(int id, color_utils::HSL* tint) const override;
81 bool GetColor(int id, SkColor* color) const override; 78 bool GetColor(int id, SkColor* color) const override;
82 bool HasCustomImage(int id) const override; 79 bool HasCustomImage(int id) const override;
83 SkColor GetFocusRingColor() const override; 80 SkColor GetFocusRingColor() const override;
84 SkColor GetThumbActiveColor() const override; 81 SkColor GetThumbActiveColor() const override;
85 SkColor GetThumbInactiveColor() const override; 82 SkColor GetThumbInactiveColor() const override;
86 SkColor GetTrackColor() const override; 83 SkColor GetTrackColor() const override;
87 SkColor GetActiveSelectionBgColor() const override; 84 SkColor GetActiveSelectionBgColor() const override;
88 SkColor GetActiveSelectionFgColor() const override; 85 SkColor GetActiveSelectionFgColor() const override;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 123
127 // This method returns the colors webkit will use for the scrollbars. When no 124 // This method returns the colors webkit will use for the scrollbars. When no
128 // colors are specified by the GTK+ theme, this function averages of the 125 // colors are specified by the GTK+ theme, this function averages of the
129 // thumb part and of the track colors. 126 // thumb part and of the track colors.
130 void SetScrollbarColors(); 127 void SetScrollbarColors();
131 128
132 // Extracts colors and tints from the GTK theme, both for the 129 // Extracts colors and tints from the GTK theme, both for the
133 // ThemeService interface and the colors we send to webkit. 130 // ThemeService interface and the colors we send to webkit.
134 void LoadGtkValues(); 131 void LoadGtkValues();
135 132
136 // Updates colors if necessary after possible modification of command line.
137 // TODO(varkha): This should not be necessary once Material Design is on
138 // unconditionally.
139 void UpdateMaterialDesignColors();
140
141 // Reads in explicit theme frame colors from the ChromeGtkFrame style class 133 // Reads in explicit theme frame colors from the ChromeGtkFrame style class
142 // or generates them per our fallback algorithm. 134 // or generates them per our fallback algorithm.
143 SkColor BuildFrameColors(); 135 SkColor BuildFrameColors();
144 136
145 // Gets a tint which depends on the default for |id| as well as |color|. 137 // Gets a tint which depends on the default for |id| as well as |color|.
146 color_utils::HSL ColorToTint(int id, SkColor color); 138 color_utils::HSL ColorToTint(int id, SkColor color);
147 139
148 // Lazily generates each image used in the gtk theme. 140 // Lazily generates each image used in the gtk theme.
149 gfx::Image GenerateGtkThemeImage(int id) const; 141 gfx::Image GenerateGtkThemeImage(int id) const;
150 SkBitmap GenerateGtkThemeBitmap(int id) const; 142 SkBitmap GenerateGtkThemeBitmap(int id) const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } // namespace libgtk2ui 237 } // namespace libgtk2ui
246 238
247 // Access point to the GTK2 desktop system. This should be the only symbol that 239 // Access point to the GTK2 desktop system. This should be the only symbol that
248 // is exported in the library; everything else should be used through the 240 // is exported in the library; everything else should be used through the
249 // interface, because eventually this .so will be loaded through dlopen at 241 // interface, because eventually this .so will be loaded through dlopen at
250 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or 242 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or
251 // QT or whatever. 243 // QT or whatever.
252 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); 244 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI();
253 245
254 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ 246 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698