| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // | 41 // |
| 42 // This can come in two flavors, main and "overflow". The main bar is visible | 42 // This can come in two flavors, main and "overflow". The main bar is visible |
| 43 // next to the omnibox, and the overflow bar is visible inside the chrome | 43 // next to the omnibox, and the overflow bar is visible inside the chrome |
| 44 // app menu. The main bar can have only a single row of icons with flexible | 44 // app menu. The main bar can have only a single row of icons with flexible |
| 45 // width, whereas the overflow bar has multiple rows of icons with a fixed | 45 // width, whereas the overflow bar has multiple rows of icons with a fixed |
| 46 // width (the width of the menu). | 46 // width (the width of the menu). |
| 47 class ToolbarActionsBar : public ToolbarActionsModel::Observer { | 47 class ToolbarActionsBar : public ToolbarActionsModel::Observer { |
| 48 public: | 48 public: |
| 49 // A struct to contain the platform settings. | 49 // A struct to contain the platform settings. |
| 50 struct PlatformSettings { | 50 struct PlatformSettings { |
| 51 explicit PlatformSettings(bool in_overflow_mode); | 51 PlatformSettings(); |
| 52 | 52 |
| 53 // The padding that comes before the first icon in the container. | 53 // The spacing between each of the icons, between the start of the |
| 54 int left_padding; | 54 // container and the first item, and between the last item and end of |
| 55 // The padding following the final icon in the container. | 55 // the container. |
| 56 int right_padding; | |
| 57 // The spacing between each of the icons. | |
| 58 int item_spacing; | 56 int item_spacing; |
| 59 // The number of icons per row in the overflow menu. | 57 // The number of icons per row in the overflow menu. |
| 60 int icons_per_overflow_menu_row; | 58 int icons_per_overflow_menu_row; |
| 61 // Whether or not the overflow menu is displayed as a chevron (this is being | 59 // Whether or not the overflow menu is displayed as a chevron (this is being |
| 62 // phased out). | 60 // phased out). |
| 63 bool chevron_enabled; | 61 bool chevron_enabled; |
| 64 }; | 62 }; |
| 65 | 63 |
| 66 // The type of drag that occurred in a drag-and-drop operation. | 64 // The type of drag that occurred in a drag-and-drop operation. |
| 67 enum DragType { | 65 enum DragType { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 pending_extension_bubble_controller_; | 329 pending_extension_bubble_controller_; |
| 332 | 330 |
| 333 base::ObserverList<ToolbarActionsBarObserver> observers_; | 331 base::ObserverList<ToolbarActionsBarObserver> observers_; |
| 334 | 332 |
| 335 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; | 333 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; |
| 336 | 334 |
| 337 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); | 335 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); |
| 338 }; | 336 }; |
| 339 | 337 |
| 340 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ | 338 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ |
| OLD | NEW |