| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 virtual void Observe(int type, | 145 virtual void Observe(int type, |
| 146 const content::NotificationSource& source, | 146 const content::NotificationSource& source, |
| 147 const content::NotificationDetails& details) OVERRIDE; | 147 const content::NotificationDetails& details) OVERRIDE; |
| 148 | 148 |
| 149 // Overridden from ui::AcceleratorProvider: | 149 // Overridden from ui::AcceleratorProvider: |
| 150 virtual bool GetAcceleratorForCommandId( | 150 virtual bool GetAcceleratorForCommandId( |
| 151 int command_id, ui::Accelerator* accelerator) OVERRIDE; | 151 int command_id, ui::Accelerator* accelerator) OVERRIDE; |
| 152 | 152 |
| 153 // Overridden from views::View: | 153 // Overridden from views::View: |
| 154 virtual gfx::Size GetPreferredSize() OVERRIDE; | 154 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 155 virtual gfx::Size GetMinimumSize() OVERRIDE; |
| 155 virtual void Layout() OVERRIDE; | 156 virtual void Layout() OVERRIDE; |
| 156 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; | 157 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; |
| 157 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 158 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 158 virtual void OnThemeChanged() OVERRIDE; | 159 virtual void OnThemeChanged() OVERRIDE; |
| 159 virtual const char* GetClassName() const OVERRIDE; | 160 virtual const char* GetClassName() const OVERRIDE; |
| 160 virtual bool AcceleratorPressed(const ui::Accelerator& acc) OVERRIDE; | 161 virtual bool AcceleratorPressed(const ui::Accelerator& acc) OVERRIDE; |
| 161 | 162 |
| 162 // Whether the wrench/hotdogs menu is currently showing. | 163 // Whether the wrench/hotdogs menu is currently showing. |
| 163 bool IsWrenchMenuShowing() const; | 164 bool IsWrenchMenuShowing() const; |
| 164 | 165 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 194 | 195 |
| 195 // Returns true if we should show the background page badge. | 196 // Returns true if we should show the background page badge. |
| 196 bool ShouldShowBackgroundPageBadge(); | 197 bool ShouldShowBackgroundPageBadge(); |
| 197 | 198 |
| 198 // Returns true if we should show the warning for incompatible software. | 199 // Returns true if we should show the warning for incompatible software. |
| 199 bool ShouldShowIncompatibilityWarning(); | 200 bool ShouldShowIncompatibilityWarning(); |
| 200 | 201 |
| 201 // Returns the number of pixels above the location bar in non-normal display. | 202 // Returns the number of pixels above the location bar in non-normal display. |
| 202 int PopupTopSpacing() const; | 203 int PopupTopSpacing() const; |
| 203 | 204 |
| 205 // Given toolbar contents of size |size|, returns the total toolbar size. |
| 206 gfx::Size SizeForContentSize(gfx::Size size) const; |
| 207 |
| 204 // Loads the images for all the child views. | 208 // Loads the images for all the child views. |
| 205 void LoadImages(); | 209 void LoadImages(); |
| 206 | 210 |
| 207 bool is_display_mode_normal() const { | 211 bool is_display_mode_normal() const { |
| 208 return display_mode_ == DISPLAYMODE_NORMAL; | 212 return display_mode_ == DISPLAYMODE_NORMAL; |
| 209 } | 213 } |
| 210 | 214 |
| 211 // Shows the critical notification bubble against the wrench menu. | 215 // Shows the critical notification bubble against the wrench menu. |
| 212 void ShowCriticalNotification(); | 216 void ShowCriticalNotification(); |
| 213 | 217 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 259 |
| 256 // A list of listeners to call when the menu opens. | 260 // A list of listeners to call when the menu opens. |
| 257 ObserverList<views::MenuListener> menu_listeners_; | 261 ObserverList<views::MenuListener> menu_listeners_; |
| 258 | 262 |
| 259 content::NotificationRegistrar registrar_; | 263 content::NotificationRegistrar registrar_; |
| 260 | 264 |
| 261 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 265 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 262 }; | 266 }; |
| 263 | 267 |
| 264 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 268 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
| OLD | NEW |