| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" | 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 class WebContents; | 23 class WebContents; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace gfx { | 26 namespace gfx { |
| 27 class FontList; | 27 class FontList; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace views { | 30 namespace views { |
| 31 class BubbleDelegateView; | 31 class BubbleDialogDelegateView; |
| 32 class ImageView; | 32 class ImageView; |
| 33 class InkDropDelegate; | 33 class InkDropDelegate; |
| 34 class Label; | 34 class Label; |
| 35 } | 35 } |
| 36 | 36 |
| 37 // The ContentSettingImageView displays an icon and optional text label for | 37 // The ContentSettingImageView displays an icon and optional text label for |
| 38 // various content settings affordances in the location bar (i.e. plugin | 38 // various content settings affordances in the location bar (i.e. plugin |
| 39 // blocking, geolocation). | 39 // blocking, geolocation). |
| 40 class ContentSettingImageView : public IconLabelBubbleView, | 40 class ContentSettingImageView : public IconLabelBubbleView, |
| 41 public gfx::AnimationDelegate, | 41 public gfx::AnimationDelegate, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void OnClick(); | 88 void OnClick(); |
| 89 | 89 |
| 90 // Updates the image and tooltip to match the current model state. | 90 // Updates the image and tooltip to match the current model state. |
| 91 void UpdateImage(); | 91 void UpdateImage(); |
| 92 | 92 |
| 93 LocationBarView* parent_; // Weak, owns us. | 93 LocationBarView* parent_; // Weak, owns us. |
| 94 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; | 94 scoped_ptr<ContentSettingImageModel> content_setting_image_model_; |
| 95 gfx::SlideAnimation slide_animator_; | 95 gfx::SlideAnimation slide_animator_; |
| 96 bool pause_animation_; | 96 bool pause_animation_; |
| 97 double pause_animation_state_; | 97 double pause_animation_state_; |
| 98 views::BubbleDelegateView* bubble_view_; | 98 views::BubbleDialogDelegateView* bubble_view_; |
| 99 | 99 |
| 100 // This is used to check if the bubble was showing during the mouse pressed | 100 // This is used to check if the bubble was showing during the mouse pressed |
| 101 // event. If this is true then the mouse released event is ignored to prevent | 101 // event. If this is true then the mouse released event is ignored to prevent |
| 102 // the bubble from reshowing. | 102 // the bubble from reshowing. |
| 103 bool suppress_mouse_released_action_; | 103 bool suppress_mouse_released_action_; |
| 104 | 104 |
| 105 // Animation delegate for the ink drop ripple effect. | 105 // Animation delegate for the ink drop ripple effect. |
| 106 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 106 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 108 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 111 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
| OLD | NEW |