OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 private: | 86 private: |
87 friend class CardUnmaskPromptViewTesterViews; | 87 friend class CardUnmaskPromptViewTesterViews; |
88 | 88 |
89 // A view that allows changing the opacity of its contents. | 89 // A view that allows changing the opacity of its contents. |
90 class FadeOutView : public View { | 90 class FadeOutView : public View { |
91 public: | 91 public: |
92 FadeOutView(); | 92 FadeOutView(); |
93 ~FadeOutView() override; | 93 ~FadeOutView() override; |
94 | 94 |
95 // views::View | 95 // views::View |
96 void PaintChildren(const ui::PaintContext& context) override; | 96 void PaintChildren(const views::PaintInfo& paint_info) override; |
97 void OnPaint(gfx::Canvas* canvas) override; | 97 void OnPaint(gfx::Canvas* canvas) override; |
98 | 98 |
99 void set_fade_everything(bool fade_everything) { | 99 void set_fade_everything(bool fade_everything) { |
100 fade_everything_ = fade_everything; | 100 fade_everything_ = fade_everything; |
101 } | 101 } |
102 | 102 |
103 // Set the alpha channel for this view. 0 is transparent and 255 is opaque. | 103 // Set the alpha channel for this view. 0 is transparent and 255 is opaque. |
104 void SetAlpha(uint8_t alpha); | 104 void SetAlpha(uint8_t alpha); |
105 | 105 |
106 private: | 106 private: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 gfx::SlideAnimation overlay_animation_; | 159 gfx::SlideAnimation overlay_animation_; |
160 | 160 |
161 base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_; | 161 base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews); | 163 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews); |
164 }; | 164 }; |
165 | 165 |
166 } // namespace autofill | 166 } // namespace autofill |
167 | 167 |
168 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ | 168 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ |
OLD | NEW |