Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 UpdateWithLocalState() override; | |
| 76 gfx::Image GetThemeImageNamed(int id) const override; | 79 gfx::Image GetThemeImageNamed(int id) const override; |
| 77 bool GetTint(int id, color_utils::HSL* tint) const override; | 80 bool GetTint(int id, color_utils::HSL* tint) const override; |
| 78 bool GetColor(int id, SkColor* color) const override; | 81 bool GetColor(int id, SkColor* color) const override; |
| 79 bool HasCustomImage(int id) const override; | 82 bool HasCustomImage(int id) const override; |
| 80 SkColor GetFocusRingColor() const override; | 83 SkColor GetFocusRingColor() const override; |
| 81 SkColor GetThumbActiveColor() const override; | 84 SkColor GetThumbActiveColor() const override; |
| 82 SkColor GetThumbInactiveColor() const override; | 85 SkColor GetThumbInactiveColor() const override; |
| 83 SkColor GetTrackColor() const override; | 86 SkColor GetTrackColor() const override; |
| 84 SkColor GetActiveSelectionBgColor() const override; | 87 SkColor GetActiveSelectionBgColor() const override; |
| 85 SkColor GetActiveSelectionFgColor() const override; | 88 SkColor GetActiveSelectionFgColor() const override; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 | 126 |
| 124 // This method returns the colors webkit will use for the scrollbars. When no | 127 // This method returns the colors webkit will use for the scrollbars. When no |
| 125 // colors are specified by the GTK+ theme, this function averages of the | 128 // colors are specified by the GTK+ theme, this function averages of the |
| 126 // thumb part and of the track colors. | 129 // thumb part and of the track colors. |
| 127 void SetScrollbarColors(); | 130 void SetScrollbarColors(); |
| 128 | 131 |
| 129 // Extracts colors and tints from the GTK theme, both for the | 132 // Extracts colors and tints from the GTK theme, both for the |
| 130 // ThemeService interface and the colors we send to webkit. | 133 // ThemeService interface and the colors we send to webkit. |
| 131 void LoadGtkValues(); | 134 void LoadGtkValues(); |
| 132 | 135 |
| 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 UpdateColors(); | |
|
Evan Stade
2016/04/08 21:14:11
s/UpdateColors/UpdateMaterialDesignColors/
varkha
2016/04/08 23:27:07
Done.
| |
| 140 | |
| 133 // Reads in explicit theme frame colors from the ChromeGtkFrame style class | 141 // Reads in explicit theme frame colors from the ChromeGtkFrame style class |
| 134 // or generates them per our fallback algorithm. | 142 // or generates them per our fallback algorithm. |
| 135 SkColor BuildFrameColors(); | 143 SkColor BuildFrameColors(); |
| 136 | 144 |
| 137 // Gets a tint which depends on the default for |id| as well as |color|. | 145 // Gets a tint which depends on the default for |id| as well as |color|. |
| 138 color_utils::HSL ColorToTint(int id, SkColor color); | 146 color_utils::HSL ColorToTint(int id, SkColor color); |
| 139 | 147 |
| 140 // Lazily generates each image used in the gtk theme. | 148 // Lazily generates each image used in the gtk theme. |
| 141 gfx::Image GenerateGtkThemeImage(int id) const; | 149 gfx::Image GenerateGtkThemeImage(int id) const; |
| 142 SkBitmap GenerateGtkThemeBitmap(int id) const; | 150 SkBitmap GenerateGtkThemeBitmap(int id) const; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 } // namespace libgtk2ui | 245 } // namespace libgtk2ui |
| 238 | 246 |
| 239 // Access point to the GTK2 desktop system. This should be the only symbol that | 247 // Access point to the GTK2 desktop system. This should be the only symbol that |
| 240 // is exported in the library; everything else should be used through the | 248 // is exported in the library; everything else should be used through the |
| 241 // interface, because eventually this .so will be loaded through dlopen at | 249 // interface, because eventually this .so will be loaded through dlopen at |
| 242 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or | 250 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or |
| 243 // QT or whatever. | 251 // QT or whatever. |
| 244 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); | 252 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); |
| 245 | 253 |
| 246 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ | 254 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ |
| OLD | NEW |