Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; | 128 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; |
| 129 virtual void OnThemeChanged() OVERRIDE; | 129 virtual void OnThemeChanged() OVERRIDE; |
| 130 | 130 |
| 131 // The apparent horizontal space between most items, and the vertical padding | 131 // The apparent horizontal space between most items, and the vertical padding |
| 132 // above and below them. | 132 // above and below them. |
| 133 static const int kStandardSpacing; | 133 static const int kStandardSpacing; |
| 134 // The top of the toolbar has an edge we have to skip over in addition to the | 134 // The top of the toolbar has an edge we have to skip over in addition to the |
| 135 // standard spacing. | 135 // standard spacing. |
| 136 static const int kVertSpacing; | 136 static const int kVertSpacing; |
| 137 | 137 |
| 138 // Gets a bitmap with the icon for the app menu and any overlaid notification | |
| 139 // badge. | |
| 140 SkBitmap GetAppMenuIcon(views::CustomButton::ButtonState state); | |
|
sky
2011/05/03 18:38:32
Move implementation to match new position in heade
SteveT
2011/05/06 18:48:43
Done in .cc. Also moved this declaration up in the
| |
| 141 | |
| 138 protected: | 142 protected: |
| 139 | 143 |
| 140 // Overridden from AccessiblePaneView | 144 // Overridden from AccessiblePaneView |
| 141 virtual views::View* GetDefaultFocusableChild() OVERRIDE; | 145 virtual views::View* GetDefaultFocusableChild() OVERRIDE; |
| 142 virtual void RemovePaneFocus() OVERRIDE; | 146 virtual void RemovePaneFocus() OVERRIDE; |
| 143 | 147 |
| 144 private: | 148 private: |
| 145 // Returns true if we should show the upgrade recommended dot. | 149 // Returns true if we should show the upgrade recommended dot. |
| 146 bool IsUpgradeRecommended(); | 150 bool IsUpgradeRecommended(); |
| 147 | 151 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 163 DISPLAYMODE_LOCATION // Slimline toolbar showing only compact location | 167 DISPLAYMODE_LOCATION // Slimline toolbar showing only compact location |
| 164 // bar, used for popups. | 168 // bar, used for popups. |
| 165 }; | 169 }; |
| 166 bool IsDisplayModeNormal() const { | 170 bool IsDisplayModeNormal() const { |
| 167 return display_mode_ == DISPLAYMODE_NORMAL; | 171 return display_mode_ == DISPLAYMODE_NORMAL; |
| 168 } | 172 } |
| 169 | 173 |
| 170 // Updates the badge on the app menu (Wrench). | 174 // Updates the badge on the app menu (Wrench). |
| 171 void UpdateAppMenuBadge(); | 175 void UpdateAppMenuBadge(); |
| 172 | 176 |
| 173 // Gets a bitmap with the icon for the app menu and any overlaid notification | |
| 174 // badge. | |
| 175 SkBitmap GetAppMenuIcon(views::CustomButton::ButtonState state); | |
| 176 | |
| 177 // Gets a badge for the wrench icon corresponding to the number of | 177 // Gets a badge for the wrench icon corresponding to the number of |
| 178 // unacknowledged background pages in the system. | 178 // unacknowledged background pages in the system. |
| 179 SkBitmap GetBackgroundPageBadge(); | 179 SkBitmap GetBackgroundPageBadge(); |
| 180 | 180 |
| 181 scoped_ptr<BackForwardMenuModel> back_menu_model_; | 181 scoped_ptr<BackForwardMenuModel> back_menu_model_; |
| 182 scoped_ptr<BackForwardMenuModel> forward_menu_model_; | 182 scoped_ptr<BackForwardMenuModel> forward_menu_model_; |
| 183 | 183 |
| 184 // The model that contains the security level, text, icon to display... | 184 // The model that contains the security level, text, icon to display... |
| 185 ToolbarModel* model_; | 185 ToolbarModel* model_; |
| 186 | 186 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 | 226 |
| 227 // If non-null the destructor sets this to true. This is set to a non-null | 227 // If non-null the destructor sets this to true. This is set to a non-null |
| 228 // while the menu is showing and used to detect if the menu was deleted while | 228 // while the menu is showing and used to detect if the menu was deleted while |
| 229 // running. | 229 // running. |
| 230 bool* destroyed_flag_; | 230 bool* destroyed_flag_; |
| 231 | 231 |
| 232 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 232 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 235 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| OLD | NEW |