| 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 ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ |
| 6 #define ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf_types.h" | 9 #include "ash/shelf_types.h" |
| 10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void ScheduleAnimation(bool start_throbber); | 312 void ScheduleAnimation(bool start_throbber); |
| 313 | 313 |
| 314 SystemTrayThrobber* throbber_; | 314 SystemTrayThrobber* throbber_; |
| 315 | 315 |
| 316 // The current tooltip text. | 316 // The current tooltip text. |
| 317 string16 tooltip_text_; | 317 string16 tooltip_text_; |
| 318 | 318 |
| 319 DISALLOW_COPY_AND_ASSIGN(ThrobberView); | 319 DISALLOW_COPY_AND_ASSIGN(ThrobberView); |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 // The 'special' looking row in the uber-tray popups. This is usually the bottom | |
| 323 // row in the popups, and has a fixed height. | |
| 324 class SpecialPopupRow : public views::View { | |
| 325 public: | |
| 326 SpecialPopupRow(); | |
| 327 virtual ~SpecialPopupRow(); | |
| 328 | |
| 329 void SetTextLabel(int string_id, ViewClickListener* listener); | |
| 330 void SetContent(views::View* view); | |
| 331 | |
| 332 void AddButton(TrayPopupHeaderButton* button); | |
| 333 void AddThrobber(ThrobberView* throbber); | |
| 334 | |
| 335 views::View* content() const { return content_; } | |
| 336 | |
| 337 private: | |
| 338 // Overridden from views::View. | |
| 339 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
| 340 virtual void Layout() OVERRIDE; | |
| 341 | |
| 342 views::View* content_; | |
| 343 views::View* button_container_; | |
| 344 views::Label* text_label_; | |
| 345 DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow); | |
| 346 }; | |
| 347 | |
| 348 // Sets up a Label properly for the tray (sets color, font etc.). | 322 // Sets up a Label properly for the tray (sets color, font etc.). |
| 349 void SetupLabelForTray(views::Label* label); | 323 void SetupLabelForTray(views::Label* label); |
| 350 | 324 |
| 351 // TODO(jennyz): refactor these two functions to SystemTrayItem. | 325 // TODO(jennyz): refactor these two functions to SystemTrayItem. |
| 352 // Sets the empty border of an image tray item for adjusting the space | 326 // Sets the empty border of an image tray item for adjusting the space |
| 353 // around it. | 327 // around it. |
| 354 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); | 328 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); |
| 355 // Sets the empty border around a label tray item for adjusting the space | 329 // Sets the empty border around a label tray item for adjusting the space |
| 356 // around it. | 330 // around it. |
| 357 void SetTrayLabelItemBorder(TrayItemView* tray_view, | 331 void SetTrayLabelItemBorder(TrayItemView* tray_view, |
| 358 ShelfAlignment alignment); | 332 ShelfAlignment alignment); |
| 359 | 333 |
| 360 } // namespace internal | 334 } // namespace internal |
| 361 } // namespace ash | 335 } // namespace ash |
| 362 | 336 |
| 363 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ | 337 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ |
| OLD | NEW |