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 24 matching lines...) Expand all Loading... |
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 overrides: |
41 virtual gfx::Size GetPreferredSize(); | 41 virtual gfx::Size GetPreferredSize(); |
42 | 42 |
43 private: | 43 private: |
44 // views::ImageView overrides: | 44 // views::ImageView overrides: |
45 virtual bool OnMousePressed(const views::MouseEvent& event); | 45 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
46 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); | 46 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
47 virtual void VisibilityChanged(View* starting_from, bool is_visible); | 47 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; |
48 virtual void OnPaint(gfx::Canvas* canvas); | 48 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
49 virtual void OnPaintBackground(gfx::Canvas* canvas); | 49 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
50 | 50 |
51 // InfoBubbleDelegate overrides: | 51 // InfoBubbleDelegate overrides: |
52 virtual void InfoBubbleClosing(InfoBubble* info_bubble, | 52 virtual void InfoBubbleClosing(InfoBubble* info_bubble, |
53 bool closed_by_escape); | 53 bool closed_by_escape) OVERRIDE; |
54 virtual bool CloseOnEscape(); | 54 virtual bool CloseOnEscape() OVERRIDE; |
55 virtual bool FadeInOnShow(); | 55 virtual bool FadeInOnShow() OVERRIDE; |
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 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 60 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
61 | 61 |
62 // The owning LocationBarView. | 62 // The owning LocationBarView. |
63 LocationBarView* parent_; | 63 LocationBarView* parent_; |
64 | 64 |
65 // The currently active profile. | 65 // The currently active profile. |
66 Profile* profile_; | 66 Profile* profile_; |
67 | 67 |
68 // The currently shown info bubble if any. | 68 // The currently shown info bubble if any. |
69 InfoBubble* info_bubble_; | 69 InfoBubble* info_bubble_; |
70 | 70 |
71 string16 animated_text_; | 71 string16 animated_text_; |
72 bool animation_in_progress_; | 72 bool animation_in_progress_; |
73 int text_size_; | 73 int text_size_; |
74 int visible_text_size_; | 74 int visible_text_size_; |
75 gfx::Insets saved_insets_; | 75 gfx::Insets saved_insets_; |
76 | 76 |
77 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); | 77 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); |
78 }; | 78 }; |
79 | 79 |
80 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 80 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
OLD | NEW |