OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 const content::NotificationDetails& details) override; | 137 const content::NotificationDetails& details) override; |
138 | 138 |
139 // ui::AcceleratorProvider: | 139 // ui::AcceleratorProvider: |
140 bool GetAcceleratorForCommandId(int command_id, | 140 bool GetAcceleratorForCommandId(int command_id, |
141 ui::Accelerator* accelerator) override; | 141 ui::Accelerator* accelerator) override; |
142 | 142 |
143 // views::View: | 143 // views::View: |
144 gfx::Size GetPreferredSize() const override; | 144 gfx::Size GetPreferredSize() const override; |
145 gfx::Size GetMinimumSize() const override; | 145 gfx::Size GetMinimumSize() const override; |
146 void Layout() override; | 146 void Layout() override; |
147 void OnPaint(gfx::Canvas* canvas) override; | |
148 void OnThemeChanged() override; | 147 void OnThemeChanged() override; |
149 const char* GetClassName() const override; | 148 const char* GetClassName() const override; |
150 bool AcceleratorPressed(const ui::Accelerator& acc) override; | 149 bool AcceleratorPressed(const ui::Accelerator& acc) override; |
151 | 150 |
152 // Whether the toolbar view needs its background painted by the | |
153 // BrowserNonClientFrameView. | |
154 bool ShouldPaintBackground() const; | |
155 | |
156 enum { | 151 enum { |
157 // The apparent horizontal space between most items, and the vertical | 152 // The apparent horizontal space between most items, and the vertical |
158 // padding above and below them. | 153 // padding above and below them. |
159 kStandardSpacing = 3, | 154 kStandardSpacing = 3, |
160 | 155 |
161 // The top of the toolbar has an edge we have to skip over in addition to | 156 // The top of the toolbar has an edge we have to skip over in addition to |
162 // the standard spacing. | 157 // the standard spacing. |
163 kVertSpacing = 5, | 158 kVertSpacing = 5, |
164 }; | 159 }; |
165 | 160 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 221 |
227 // The display mode used when laying out the toolbar. | 222 // The display mode used when laying out the toolbar. |
228 DisplayMode display_mode_; | 223 DisplayMode display_mode_; |
229 | 224 |
230 content::NotificationRegistrar registrar_; | 225 content::NotificationRegistrar registrar_; |
231 | 226 |
232 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 227 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
233 }; | 228 }; |
234 | 229 |
235 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 230 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
OLD | NEW |