Chromium Code Reviews| 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 23 matching lines...) Expand all Loading... | |
| 34 public views::WidgetObserver { | 34 public views::WidgetObserver { |
| 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 // Updates the decoration from the shown WebContents after layouting has | |
| 45 // happened. This is necessary to get the right coordinates for the shown | |
| 46 // icons. | |
|
Peter Kasting
2013/09/03 23:50:43
This comment seems like it's on the wrong function
npentrel
2013/09/04 09:55:36
Done.
| |
| 47 void UpdatePreLayout(content::WebContents* web_contents); | |
| 48 | |
| 44 // Update the decoration from the shown WebContents. | 49 // Update the decoration from the shown WebContents. |
| 45 void Update(content::WebContents* web_contents); | 50 void UpdatePostLayout(content::WebContents* web_contents); |
| 46 | 51 |
| 47 private: | 52 private: |
| 48 // Number of milliseconds spent animating open; also the time spent animating | 53 // Number of milliseconds spent animating open; also the time spent animating |
| 49 // closed. | 54 // closed. |
| 50 static const int kOpenTimeMS; | 55 static const int kOpenTimeMS; |
| 51 | 56 |
| 52 // The total animation time, including open and close as well as an | 57 // The total animation time, including open and close as well as an |
| 53 // intervening "stay open" period. | 58 // intervening "stay open" period. |
| 54 static const int kAnimationDurationMS; | 59 static const int kAnimationDurationMS; |
| 55 | 60 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 views::Label* text_label_; | 95 views::Label* text_label_; |
| 91 ui::SlideAnimation slide_animator_; | 96 ui::SlideAnimation slide_animator_; |
| 92 bool pause_animation_; | 97 bool pause_animation_; |
| 93 double pause_animation_state_; | 98 double pause_animation_state_; |
| 94 views::Widget* bubble_widget_; | 99 views::Widget* bubble_widget_; |
| 95 | 100 |
| 96 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 101 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
| 97 }; | 102 }; |
| 98 | 103 |
| 99 #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 |