| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 10 #include <string> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Returns true if the app menu is focused. | 63 // Returns true if the app menu is focused. |
| 64 bool IsAppMenuFocused(); | 64 bool IsAppMenuFocused(); |
| 65 | 65 |
| 66 // Add a listener to receive a callback when the menu opens. | 66 // Add a listener to receive a callback when the menu opens. |
| 67 void AddMenuListener(views::MenuListener* listener); | 67 void AddMenuListener(views::MenuListener* listener); |
| 68 | 68 |
| 69 // Remove a menu listener. | 69 // Remove a menu listener. |
| 70 void RemoveMenuListener(views::MenuListener* listener); | 70 void RemoveMenuListener(views::MenuListener* listener); |
| 71 | 71 |
| 72 // Gets a bitmap with the icon for the app menu and any overlaid notification | 72 // Gets an image with the icon for the app menu and any overlaid notification |
| 73 // badge. | 73 // badge. |
| 74 SkBitmap GetAppMenuIcon(views::CustomButton::ButtonState state); | 74 gfx::ImageSkia GetAppMenuIcon(views::CustomButton::ButtonState state); |
| 75 | 75 |
| 76 virtual bool GetAcceleratorInfo(int id, ui::Accelerator* accel); | 76 virtual bool GetAcceleratorInfo(int id, ui::Accelerator* accel); |
| 77 | 77 |
| 78 // Accessors... | 78 // Accessors... |
| 79 Browser* browser() const { return browser_; } | 79 Browser* browser() const { return browser_; } |
| 80 BrowserActionsContainer* browser_actions() const { return browser_actions_; } | 80 BrowserActionsContainer* browser_actions() const { return browser_actions_; } |
| 81 ReloadButton* reload_button() const { return reload_; } | 81 ReloadButton* reload_button() const { return reload_; } |
| 82 LocationBarView* location_bar() const { return location_bar_; } | 82 LocationBarView* location_bar() const { return location_bar_; } |
| 83 views::MenuButton* app_menu() const { return app_menu_; } | 83 views::MenuButton* app_menu() const { return app_menu_; } |
| 84 | 84 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 // Shows the critical notification bubble against the wrench menu. | 177 // Shows the critical notification bubble against the wrench menu. |
| 178 void ShowCriticalNotification(); | 178 void ShowCriticalNotification(); |
| 179 | 179 |
| 180 // Updates the badge and the accessible name of the app menu (Wrench). | 180 // Updates the badge and the accessible name of the app menu (Wrench). |
| 181 void UpdateAppMenuState(); | 181 void UpdateAppMenuState(); |
| 182 | 182 |
| 183 // Gets a badge for the wrench icon corresponding to the number of | 183 // Gets a badge for the wrench icon corresponding to the number of |
| 184 // unacknowledged background pages in the system. | 184 // unacknowledged background pages in the system. |
| 185 SkBitmap GetBackgroundPageBadge(); | 185 gfx::ImageSkia GetBackgroundPageBadge(); |
| 186 | 186 |
| 187 scoped_ptr<BackForwardMenuModel> back_menu_model_; | 187 scoped_ptr<BackForwardMenuModel> back_menu_model_; |
| 188 scoped_ptr<BackForwardMenuModel> forward_menu_model_; | 188 scoped_ptr<BackForwardMenuModel> forward_menu_model_; |
| 189 | 189 |
| 190 // The model that contains the security level, text, icon to display... | 190 // The model that contains the security level, text, icon to display... |
| 191 ToolbarModel* model_; | 191 ToolbarModel* model_; |
| 192 | 192 |
| 193 // Controls | 193 // Controls |
| 194 views::ImageButton* back_; | 194 views::ImageButton* back_; |
| 195 views::ImageButton* forward_; | 195 views::ImageButton* forward_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 214 | 214 |
| 215 // A list of listeners to call when the menu opens. | 215 // A list of listeners to call when the menu opens. |
| 216 ObserverList<views::MenuListener> menu_listeners_; | 216 ObserverList<views::MenuListener> menu_listeners_; |
| 217 | 217 |
| 218 content::NotificationRegistrar registrar_; | 218 content::NotificationRegistrar registrar_; |
| 219 | 219 |
| 220 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 220 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 223 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
| OLD | NEW |