| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 private: | 154 private: |
| 155 // Types of display mode this toolbar can have. | 155 // Types of display mode this toolbar can have. |
| 156 enum DisplayMode { | 156 enum DisplayMode { |
| 157 DISPLAYMODE_NORMAL, // Normal toolbar with buttons, etc. | 157 DISPLAYMODE_NORMAL, // Normal toolbar with buttons, etc. |
| 158 DISPLAYMODE_LOCATION // Slimline toolbar showing only compact location | 158 DISPLAYMODE_LOCATION // Slimline toolbar showing only compact location |
| 159 // bar, used for popups. | 159 // bar, used for popups. |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 // AppMenuIconController::Delegate: | 162 // AppMenuIconController::Delegate: |
| 163 void UpdateSeverity(AppMenuIconController::IconType type, | 163 void UpdateSeverity(AppMenuIconController::IconType type, |
| 164 AppMenuIconPainter::Severity severity, | 164 AppMenuIconController::Severity severity, |
| 165 bool animate) override; | 165 bool animate) override; |
| 166 | 166 |
| 167 // Used to avoid duplicating the near-identical logic of | 167 // Used to avoid duplicating the near-identical logic of |
| 168 // ToolbarView::GetPreferredSize() and ToolbarView::GetMinimumSize(). These | 168 // ToolbarView::GetPreferredSize() and ToolbarView::GetMinimumSize(). These |
| 169 // two functions call through to GetSizeInternal(), passing themselves as the | 169 // two functions call through to GetSizeInternal(), passing themselves as the |
| 170 // function pointer |View::*get_size|. | 170 // function pointer |View::*get_size|. |
| 171 gfx::Size GetSizeInternal(gfx::Size (View::*get_size)() const) const; | 171 gfx::Size GetSizeInternal(gfx::Size (View::*get_size)() const) const; |
| 172 | 172 |
| 173 // Given toolbar contents of size |size|, returns the total toolbar size. | 173 // Given toolbar contents of size |size|, returns the total toolbar size. |
| 174 gfx::Size SizeForContentSize(gfx::Size size) const; | 174 gfx::Size SizeForContentSize(gfx::Size size) const; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 // The display mode used when laying out the toolbar. | 209 // The display mode used when laying out the toolbar. |
| 210 const DisplayMode display_mode_; | 210 const DisplayMode display_mode_; |
| 211 | 211 |
| 212 content::NotificationRegistrar registrar_; | 212 content::NotificationRegistrar registrar_; |
| 213 | 213 |
| 214 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 214 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 217 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
| OLD | NEW |