| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "chrome/browser/ui/views/location_bar/touchable_location_bar_view.h" |
| 12 #include "chrome/common/content_settings_types.h" | 13 #include "chrome/common/content_settings_types.h" |
| 13 #include "ui/base/animation/animation_delegate.h" | 14 #include "ui/base/animation/animation_delegate.h" |
| 14 #include "ui/views/controls/image_view.h" | 15 #include "ui/views/controls/image_view.h" |
| 15 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
| 16 | 17 |
| 17 class ContentSettingImageModel; | 18 class ContentSettingImageModel; |
| 18 class ContentSettingBubbleContents; | 19 class ContentSettingBubbleContents; |
| 19 class LocationBarView; | 20 class LocationBarView; |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 class WebContents; | 23 class WebContents; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace views { | 26 namespace views { |
| 26 class MouseEvent; | 27 class MouseEvent; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace ui { | 30 namespace ui { |
| 30 class SlideAnimation; | 31 class SlideAnimation; |
| 31 } | 32 } |
| 32 | 33 |
| 33 class ContentSettingsDelegateView; | 34 class ContentSettingsDelegateView; |
| 34 | 35 |
| 35 class ContentSettingImageView : public views::ImageView, | 36 class ContentSettingImageView |
| 36 public ui::AnimationDelegate, | 37 : public views::ImageView, |
| 37 public views::Widget::Observer { | 38 public ui::AnimationDelegate, |
| 39 public views::Widget::Observer, |
| 40 public TouchableLocationBarView<ContentSettingImageView> { |
| 38 public: | 41 public: |
| 39 ContentSettingImageView(ContentSettingsType content_type, | 42 ContentSettingImageView(ContentSettingsType content_type, |
| 40 LocationBarView* parent); | 43 LocationBarView* parent); |
| 41 virtual ~ContentSettingImageView(); | 44 virtual ~ContentSettingImageView(); |
| 42 | 45 |
| 43 // |new_navigation| true if this is a new navigation, false if the tab was | 46 // |new_navigation| true if this is a new navigation, false if the tab was |
| 44 // just switched to. | 47 // just switched to. |
| 45 void UpdateFromWebContents(content::WebContents* web_contents); | 48 void UpdateFromWebContents(content::WebContents* web_contents); |
| 46 | 49 |
| 47 // views::View overrides: | 50 // views::View overrides: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 73 string16 animated_text_; | 76 string16 animated_text_; |
| 74 bool pause_animation_; | 77 bool pause_animation_; |
| 75 int text_size_; | 78 int text_size_; |
| 76 int visible_text_size_; | 79 int visible_text_size_; |
| 77 gfx::Insets saved_insets_; | 80 gfx::Insets saved_insets_; |
| 78 | 81 |
| 79 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); | 82 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingImageView); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 85 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
| OLD | NEW |