| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 class FixedSizedScrollView : public views::ScrollView { | 131 class FixedSizedScrollView : public views::ScrollView { |
| 132 public: | 132 public: |
| 133 FixedSizedScrollView(); | 133 FixedSizedScrollView(); |
| 134 | 134 |
| 135 virtual ~FixedSizedScrollView(); | 135 virtual ~FixedSizedScrollView(); |
| 136 | 136 |
| 137 void SetContentsView(View* view); | 137 void SetContentsView(View* view); |
| 138 | 138 |
| 139 void set_fixed_size(gfx::Size size) { fixed_size_ = size; } | 139 void set_fixed_size(gfx::Size size) { fixed_size_ = size; } |
| 140 | 140 |
| 141 private: | 141 // views::View public method overrides. |
| 142 // Overridden from views::View. | |
| 143 virtual gfx::Size GetPreferredSize() OVERRIDE; | 142 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 144 virtual void Layout() OVERRIDE; | 143 virtual void Layout() OVERRIDE; |
| 144 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
| 145 |
| 146 protected: |
| 147 // views::View protected method overrides. |
| 145 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 148 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
| 146 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | |
| 147 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 149 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 148 | 150 |
| 151 private: |
| 149 gfx::Size fixed_size_; | 152 gfx::Size fixed_size_; |
| 150 | 153 |
| 151 DISALLOW_COPY_AND_ASSIGN(FixedSizedScrollView); | 154 DISALLOW_COPY_AND_ASSIGN(FixedSizedScrollView); |
| 152 }; | 155 }; |
| 153 | 156 |
| 154 // A custom textbutton with some extra vertical padding, and custom border, | 157 // A custom textbutton with some extra vertical padding, and custom border, |
| 155 // alignment and hover-effects. | 158 // alignment and hover-effects. |
| 156 class TrayPopupTextButton : public views::TextButton { | 159 class TrayPopupTextButton : public views::TextButton { |
| 157 public: | 160 public: |
| 158 TrayPopupTextButton(views::ButtonListener* listener, const string16& text); | 161 TrayPopupTextButton(views::ButtonListener* listener, const string16& text); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); | 265 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); |
| 263 }; | 266 }; |
| 264 | 267 |
| 265 // Sets up a Label properly for the tray (sets color, font etc.). | 268 // Sets up a Label properly for the tray (sets color, font etc.). |
| 266 void SetupLabelForTray(views::Label* label); | 269 void SetupLabelForTray(views::Label* label); |
| 267 | 270 |
| 268 } // namespace internal | 271 } // namespace internal |
| 269 } // namespace ash | 272 } // namespace ash |
| 270 | 273 |
| 271 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ | 274 #endif // ASH_SYSTEM_TRAY_TRAY_VIEWS_H_ |
| OLD | NEW |