| 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/common/content_settings_types.h" | 9 #include "chrome/common/content_settings_types.h" |
| 10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 ContentSettingImageView(ContentSettingsType content_type, | 36 ContentSettingImageView(ContentSettingsType content_type, |
| 37 LocationBarView* parent, | 37 LocationBarView* parent, |
| 38 const gfx::Font& font, | 38 const gfx::Font& font, |
| 39 int font_y_offset, | 39 int font_y_offset, |
| 40 SkColor text_color, | 40 SkColor text_color, |
| 41 SkColor parent_background_color); | 41 SkColor parent_background_color); |
| 42 virtual ~ContentSettingImageView(); | 42 virtual ~ContentSettingImageView(); |
| 43 | 43 |
| 44 // Update the decoration from the shown WebContents. | 44 // Update the decoration from the shown WebContents. |
| 45 void Update(content::WebContents* web_contents); | 45 void UpdatePreLayout(content::WebContents* web_contents); |
| 46 |
| 47 // Perform any updates which depend on the image having already been laid out |
| 48 // by the owning LocationBarView. |
| 49 void UpdatePostLayout(content::WebContents* web_contents); |
| 46 | 50 |
| 47 private: | 51 private: |
| 48 // Number of milliseconds spent animating open; also the time spent animating | 52 // Number of milliseconds spent animating open; also the time spent animating |
| 49 // closed. | 53 // closed. |
| 50 static const int kOpenTimeMS; | 54 static const int kOpenTimeMS; |
| 51 | 55 |
| 52 // The total animation time, including open and close as well as an | 56 // The total animation time, including open and close as well as an |
| 53 // intervening "stay open" period. | 57 // intervening "stay open" period. |
| 54 static const int kAnimationDurationMS; | 58 static const int kAnimationDurationMS; |
| 55 | 59 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 views::Label* text_label_; | 94 views::Label* text_label_; |
| 91 ui::SlideAnimation slide_animator_; | 95 ui::SlideAnimation slide_animator_; |
| 92 bool pause_animation_; | 96 bool pause_animation_; |
| 93 double pause_animation_state_; | 97 double pause_animation_state_; |
| 94 views::Widget* bubble_widget_; | 98 views::Widget* bubble_widget_; |
| 95 | 99 |
| 96 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 100 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 103 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
| OLD | NEW |