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_CONTENT_SETTING_IMAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 ContentSettingImageView(ContentSettingsType content_type, | 30 ContentSettingImageView(ContentSettingsType content_type, |
31 LocationBarView* parent, | 31 LocationBarView* parent, |
32 Profile* profile); | 32 Profile* profile); |
33 virtual ~ContentSettingImageView(); | 33 virtual ~ContentSettingImageView(); |
34 | 34 |
35 void set_profile(Profile* profile) { profile_ = profile; } | 35 void set_profile(Profile* profile) { profile_ = profile; } |
36 // |new_navigation| true if this is a new navigation, false if the tab was | 36 // |new_navigation| true if this is a new navigation, false if the tab was |
37 // just switched to. | 37 // just switched to. |
38 void UpdateFromTabContents(TabContents* tab_contents); | 38 void UpdateFromTabContents(TabContents* tab_contents); |
39 | 39 |
40 // views::View overrides: | 40 // views::View/ImageView overrides: |
41 virtual gfx::Size GetPreferredSize(); | 41 virtual gfx::Size GetPreferredSize(); |
42 | 42 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
43 private: | 43 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
sadrul
2011/03/19 09:15:30
Why private->public?
msw
2011/03/26 00:09:50
Done.
| |
44 // views::ImageView overrides: | |
45 virtual bool OnMousePressed(const views::MouseEvent& event); | |
46 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); | |
47 virtual void VisibilityChanged(View* starting_from, bool is_visible); | |
48 virtual void OnPaint(gfx::Canvas* canvas); | |
49 virtual void OnPaintBackground(gfx::Canvas* canvas); | |
50 | 44 |
51 // InfoBubbleDelegate overrides: | 45 // InfoBubbleDelegate overrides: |
52 virtual void InfoBubbleClosing(InfoBubble* info_bubble, | 46 virtual void InfoBubbleClosing(InfoBubble* info_bubble, |
53 bool closed_by_escape); | 47 bool closed_by_escape) OVERRIDE; |
54 virtual bool CloseOnEscape(); | 48 virtual bool CloseOnEscape() OVERRIDE; |
55 virtual bool FadeInOnShow(); | 49 virtual bool FadeInOnShow() OVERRIDE; |
50 | |
51 protected: | |
52 // views::View/ImageView overrides: | |
53 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; | |
54 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | |
55 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | |
sadrul
2011/03/19 09:15:30
Why private->protected?
msw
2011/03/26 00:09:50
Done.
| |
56 | 56 |
57 // ui::LinearAnimation override: | 57 // ui::LinearAnimation override: |
58 virtual void AnimateToState(double state); | 58 virtual void AnimateToState(double state) OVERRIDE; |
59 | 59 |
60 private: | |
60 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 61 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
61 | 62 |
62 // The owning LocationBarView. | 63 // The owning LocationBarView. |
63 LocationBarView* parent_; | 64 LocationBarView* parent_; |
64 | 65 |
65 // The currently active profile. | 66 // The currently active profile. |
66 Profile* profile_; | 67 Profile* profile_; |
67 | 68 |
68 // The currently shown info bubble if any. | 69 // The currently shown info bubble if any. |
69 InfoBubble* info_bubble_; | 70 InfoBubble* info_bubble_; |
70 | 71 |
71 string16 animated_text_; | 72 string16 animated_text_; |
72 bool animation_in_progress_; | 73 bool animation_in_progress_; |
73 int text_size_; | 74 int text_size_; |
74 int visible_text_size_; | 75 int visible_text_size_; |
75 gfx::Insets saved_insets_; | 76 gfx::Insets saved_insets_; |
76 | 77 |
77 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); | 78 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); |
78 }; | 79 }; |
79 | 80 |
80 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 81 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
OLD | NEW |