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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 ContentSettingImageView(ContentSettingImageModel* image_model, | 45 ContentSettingImageView(ContentSettingImageModel* image_model, |
46 LocationBarView* parent, | 46 LocationBarView* parent, |
47 const gfx::FontList& font_list, | 47 const gfx::FontList& font_list, |
48 SkColor parent_background_color); | 48 SkColor parent_background_color); |
49 ~ContentSettingImageView() override; | 49 ~ContentSettingImageView() override; |
50 | 50 |
51 // Updates the decoration from the shown WebContents. | 51 // Updates the decoration from the shown WebContents. |
52 void Update(content::WebContents* web_contents); | 52 void Update(content::WebContents* web_contents); |
53 | 53 |
54 private: | 54 private: |
55 // Number of milliseconds spent animating open; also the time spent animating | |
56 // closed. | |
57 static const int kOpenTimeMS; | |
58 | |
59 // The total animation time, including open and close as well as an | 55 // The total animation time, including open and close as well as an |
60 // intervening "stay open" period. | 56 // intervening "stay open" period. |
61 static const int kAnimationDurationMS; | 57 static const int kAnimationDurationMS; |
62 | 58 |
63 // IconLabelBubbleView: | 59 // IconLabelBubbleView: |
64 const char* GetClassName() const override; | 60 const char* GetClassName() const override; |
65 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 61 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
66 bool OnMousePressed(const ui::MouseEvent& event) override; | 62 bool OnMousePressed(const ui::MouseEvent& event) override; |
67 void OnMouseReleased(const ui::MouseEvent& event) override; | 63 void OnMouseReleased(const ui::MouseEvent& event) override; |
68 void OnGestureEvent(ui::GestureEvent* event) override; | 64 void OnGestureEvent(ui::GestureEvent* event) override; |
(...skipping 27 matching lines...) Expand all Loading... |
96 | 92 |
97 // This is used to check if the bubble was showing during the mouse pressed | 93 // This is used to check if the bubble was showing during the mouse pressed |
98 // event. If this is true then the mouse released event is ignored to prevent | 94 // event. If this is true then the mouse released event is ignored to prevent |
99 // the bubble from reshowing. | 95 // the bubble from reshowing. |
100 bool suppress_mouse_released_action_; | 96 bool suppress_mouse_released_action_; |
101 | 97 |
102 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); | 98 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageView); |
103 }; | 99 }; |
104 | 100 |
105 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ | 101 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CONTENT_SETTING_IMAGE_VIEW_H_ |
OLD | NEW |