OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_LOCATION_BAR_PAGE_ACTION_WITH_BADGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_WITH_BADGE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_WITH_BADGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_WITH_BADGE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "gfx/size.h" | 9 #include "ui/gfx/size.h" |
10 #include "views/view.h" | 10 #include "views/view.h" |
11 | 11 |
12 class GURL; | 12 class GURL; |
13 class PageActionImageView; | 13 class PageActionImageView; |
14 class TabContents; | 14 class TabContents; |
15 | 15 |
16 // A container for the PageActionImageView plus its badge. | 16 // A container for the PageActionImageView plus its badge. |
17 class PageActionWithBadgeView : public views::View { | 17 class PageActionWithBadgeView : public views::View { |
18 public: | 18 public: |
19 explicit PageActionWithBadgeView(PageActionImageView* image_view); | 19 explicit PageActionWithBadgeView(PageActionImageView* image_view); |
20 | 20 |
21 PageActionImageView* image_view() { return image_view_; } | 21 PageActionImageView* image_view() { return image_view_; } |
22 | 22 |
23 virtual AccessibilityTypes::Role GetAccessibleRole(); | 23 virtual AccessibilityTypes::Role GetAccessibleRole(); |
24 virtual gfx::Size GetPreferredSize(); | 24 virtual gfx::Size GetPreferredSize(); |
25 | 25 |
26 void UpdateVisibility(TabContents* contents, const GURL& url); | 26 void UpdateVisibility(TabContents* contents, const GURL& url); |
27 | 27 |
28 private: | 28 private: |
29 virtual void Layout(); | 29 virtual void Layout(); |
30 | 30 |
31 // The button this view contains. | 31 // The button this view contains. |
32 PageActionImageView* image_view_; | 32 PageActionImageView* image_view_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(PageActionWithBadgeView); | 34 DISALLOW_COPY_AND_ASSIGN(PageActionWithBadgeView); |
35 }; | 35 }; |
36 | 36 |
37 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_WITH_BADGE_VIEW_H_ | 37 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_WITH_BADGE_VIEW_H_ |
OLD | NEW |