OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_BROWSER_TOOLBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void UpdateTabContents(TabContents* contents, bool should_restore_state); | 70 void UpdateTabContents(TabContents* contents, bool should_restore_state); |
71 | 71 |
72 ToolbarStarToggleGtk* star() { return star_.get(); } | 72 ToolbarStarToggleGtk* star() { return star_.get(); } |
73 | 73 |
74 // Implement AutocompletePopupPositioner, return the position of where the | 74 // Implement AutocompletePopupPositioner, return the position of where the |
75 // Omnibox results popup should go (from the star to the go buttons). | 75 // Omnibox results popup should go (from the star to the go buttons). |
76 virtual gfx::Rect GetPopupBounds() const; | 76 virtual gfx::Rect GetPopupBounds() const; |
77 | 77 |
78 private: | 78 private: |
79 // Builds a toolbar button with all the properties set. | 79 // Builds a toolbar button with all the properties set. |
| 80 // |spacing| is the width of padding (in pixels) on the left and right of the |
| 81 // button. |
80 CustomDrawButton* BuildToolbarButton(int normal_id, | 82 CustomDrawButton* BuildToolbarButton(int normal_id, |
81 int active_id, | 83 int active_id, |
82 int highlight_id, | 84 int highlight_id, |
83 int depressed_id, | 85 int depressed_id, |
84 const std::string& localized_tooltip); | 86 const std::string& localized_tooltip, |
| 87 int spacing); |
85 | 88 |
86 ToolbarStarToggleGtk* BuildStarButton(const std::string& localized_tooltip); | 89 ToolbarStarToggleGtk* BuildStarButton(const std::string& localized_tooltip); |
87 | 90 |
88 void BuildToolbarMenuButton( | 91 void BuildToolbarMenuButton( |
89 int icon_id, | 92 int icon_id, |
90 const std::string& localized_tooltip, | 93 const std::string& localized_tooltip, |
91 OwnedWidgetGtk* owner); | 94 OwnedWidgetGtk* owner); |
92 | 95 |
93 // Adds a keyboard accelerator which triggers a button (e.g., ctrl+r is now | 96 // Adds a keyboard accelerator which triggers a button (e.g., ctrl+r is now |
94 // equivalent to a reload click). | 97 // equivalent to a reload click). |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Browser* browser_; | 146 Browser* browser_; |
144 Profile* profile_; | 147 Profile* profile_; |
145 | 148 |
146 // Controls whether or not a home button should be shown on the toolbar. | 149 // Controls whether or not a home button should be shown on the toolbar. |
147 BooleanPrefMember show_home_button_; | 150 BooleanPrefMember show_home_button_; |
148 | 151 |
149 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); | 152 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); |
150 }; | 153 }; |
151 | 154 |
152 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 155 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
OLD | NEW |