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

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

Issue 132023010: linux_aura: Fixes a couple of issues with the button border integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw's return statement comment Created 6 years, 11 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) 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 27 matching lines...) Expand all
38 class Gtk2UI : public views::LinuxUI { 38 class Gtk2UI : public views::LinuxUI {
39 public: 39 public:
40 Gtk2UI(); 40 Gtk2UI();
41 virtual ~Gtk2UI(); 41 virtual ~Gtk2UI();
42 42
43 void SetWindowButtonOrdering( 43 void SetWindowButtonOrdering(
44 const std::vector<views::FrameButton>& leading_buttons, 44 const std::vector<views::FrameButton>& leading_buttons,
45 const std::vector<views::FrameButton>& trailing_buttons); 45 const std::vector<views::FrameButton>& trailing_buttons);
46 46
47 // Draws the GTK button border for state |gtk_state| onto a bitmap. 47 // Draws the GTK button border for state |gtk_state| onto a bitmap.
48 SkBitmap DrawGtkButtonBorder(int gtk_state, int width, int height) const; 48 SkBitmap DrawGtkButtonBorder(int gtk_state,
49 bool focused,
50 int width,
51 int height) const;
49 52
50 // Returns the current insets for a button. 53 // Returns the current insets for a button.
51 gfx::Insets GetButtonInsets() const; 54 gfx::Insets GetButtonInsets() const;
52 55
53 // We keep track of live Gtk2Border objects since we must alert them to theme 56 // We keep track of live Gtk2Border objects since we must alert them to theme
54 // changes. 57 // changes.
55 void AddGtkBorder(Gtk2Border* border); 58 void AddGtkBorder(Gtk2Border* border);
56 void RemoveGtkBorder(Gtk2Border* border); 59 void RemoveGtkBorder(Gtk2Border* border);
57 60
58 // ui::LinuxInputMethodContextFactory: 61 // ui::LinuxInputMethodContextFactory:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual bool GetDefaultUsesSystemTheme() const OVERRIDE; 94 virtual bool GetDefaultUsesSystemTheme() const OVERRIDE;
92 virtual void SetDownloadCount(int count) const OVERRIDE; 95 virtual void SetDownloadCount(int count) const OVERRIDE;
93 virtual void SetProgressFraction(float percentage) const OVERRIDE; 96 virtual void SetProgressFraction(float percentage) const OVERRIDE;
94 virtual bool IsStatusIconSupported() const OVERRIDE; 97 virtual bool IsStatusIconSupported() const OVERRIDE;
95 virtual scoped_ptr<views::StatusIconLinux> CreateLinuxStatusIcon( 98 virtual scoped_ptr<views::StatusIconLinux> CreateLinuxStatusIcon(
96 const gfx::ImageSkia& image, 99 const gfx::ImageSkia& image,
97 const base::string16& tool_tip) const OVERRIDE; 100 const base::string16& tool_tip) const OVERRIDE;
98 virtual gfx::Image GetIconForContentType( 101 virtual gfx::Image GetIconForContentType(
99 const std::string& content_type, int size) const OVERRIDE; 102 const std::string& content_type, int size) const OVERRIDE;
100 virtual scoped_ptr<views::Border> CreateNativeBorder( 103 virtual scoped_ptr<views::Border> CreateNativeBorder(
101 views::CustomButton* owning_button, 104 views::LabelButton* owning_button,
102 scoped_ptr<views::Border> border) OVERRIDE; 105 scoped_ptr<views::Border> border) OVERRIDE;
103 virtual void AddWindowButtonOrderObserver( 106 virtual void AddWindowButtonOrderObserver(
104 views::WindowButtonOrderObserver* observer) OVERRIDE; 107 views::WindowButtonOrderObserver* observer) OVERRIDE;
105 virtual void RemoveWindowButtonOrderObserver( 108 virtual void RemoveWindowButtonOrderObserver(
106 views::WindowButtonOrderObserver* observer) OVERRIDE; 109 views::WindowButtonOrderObserver* observer) OVERRIDE;
107 virtual bool UnityIsRunning() OVERRIDE; 110 virtual bool UnityIsRunning() OVERRIDE;
108 111
109 private: 112 private:
110 typedef std::map<int, SkColor> ColorMap; 113 typedef std::map<int, SkColor> ColorMap;
111 typedef std::map<int, color_utils::HSL> TintMap; 114 typedef std::map<int, color_utils::HSL> TintMap;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } // namespace libgtk2ui 246 } // namespace libgtk2ui
244 247
245 // Access point to the GTK2 desktop system. This should be the only symbol that 248 // Access point to the GTK2 desktop system. This should be the only symbol that
246 // is exported in the library; everything else should be used through the 249 // is exported in the library; everything else should be used through the
247 // interface, because eventually this .so will be loaded through dlopen at 250 // interface, because eventually this .so will be loaded through dlopen at
248 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or 251 // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or
249 // QT or whatever. 252 // QT or whatever.
250 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); 253 LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI();
251 254
252 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ 255 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698