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