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