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 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 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 65 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
66 bool OnMousePressed(const ui::MouseEvent& event) override; | 66 bool OnMousePressed(const ui::MouseEvent& event) override; |
67 void OnMouseReleased(const ui::MouseEvent& event) override; | 67 void OnMouseReleased(const ui::MouseEvent& event) override; |
68 void OnGestureEvent(ui::GestureEvent* event) override; | 68 void OnGestureEvent(ui::GestureEvent* event) override; |
69 void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; | 69 void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; |
70 SkColor GetTextColor() const override; | 70 SkColor GetTextColor() const override; |
71 SkColor GetBorderColor() const override; | 71 SkColor GetBorderColor() const override; |
72 bool ShouldShowBackground() const override; | 72 bool ShouldShowBackground() const override; |
73 double WidthMultiplier() const override; | 73 double WidthMultiplier() const override; |
74 bool IsShrinking() const override; | 74 bool IsShrinking() const override; |
75 bool OnActivate() override; | 75 bool OnActivate(const ui::Event& event) override; |
76 | 76 |
77 // gfx::AnimationDelegate: | 77 // gfx::AnimationDelegate: |
78 void AnimationEnded(const gfx::Animation* animation) override; | 78 void AnimationEnded(const gfx::Animation* animation) override; |
79 void AnimationProgressed(const gfx::Animation* animation) override; | 79 void AnimationProgressed(const gfx::Animation* animation) override; |
80 void AnimationCanceled(const gfx::Animation* animation) override; | 80 void AnimationCanceled(const gfx::Animation* animation) override; |
81 | 81 |
82 // views::WidgetObserver: | 82 // views::WidgetObserver: |
83 void OnWidgetDestroying(views::Widget* widget) override; | 83 void OnWidgetDestroying(views::Widget* widget) override; |
84 void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; | 84 void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; |
85 | 85 |
86 // Updates the image and tooltip to match the current model state. | 86 // Updates the image and tooltip to match the current model state. |
87 void UpdateImage(); | 87 void UpdateImage(); |
88 | 88 |
89 LocationBarView* parent_; // Weak, owns us. | 89 LocationBarView* parent_; // Weak, owns us. |
90 std::unique_ptr<ContentSettingImageModel> content_setting_image_model_; | 90 std::unique_ptr<ContentSettingImageModel> content_setting_image_model_; |
91 gfx::SlideAnimation slide_animator_; | 91 gfx::SlideAnimation slide_animator_; |
92 bool pause_animation_; | 92 bool pause_animation_; |
93 double pause_animation_state_; | 93 double pause_animation_state_; |
94 views::BubbleDialogDelegateView* bubble_view_; | 94 views::BubbleDialogDelegateView* bubble_view_; |
95 | 95 |
96 // This is used to check if the bubble was showing during the mouse pressed | 96 // This is used to check if the bubble was showing during the mouse pressed |
97 // event. If this is true then the mouse released event is ignored to prevent | 97 // event. If this is true then the mouse released event is ignored to prevent |
98 // the bubble from reshowing. | 98 // the bubble from reshowing. |
99 bool suppress_mouse_released_action_; | 99 bool suppress_mouse_released_action_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 101 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
102 }; | 102 }; |
103 | 103 |
104 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 104 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
OLD | NEW |