| 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 "chrome/browser/ui/autofill/autofill_dialog_models.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
| 9 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" | 9 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" |
| 10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 private: | 74 private: |
| 75 friend class CardUnmaskPromptViewTesterViews; | 75 friend class CardUnmaskPromptViewTesterViews; |
| 76 | 76 |
| 77 // A view that allows changing the opacity of its contents. | 77 // A view that allows changing the opacity of its contents. |
| 78 class FadeOutView : public views::View { | 78 class FadeOutView : public views::View { |
| 79 public: | 79 public: |
| 80 FadeOutView(); | 80 FadeOutView(); |
| 81 ~FadeOutView() override; | 81 ~FadeOutView() override; |
| 82 | 82 |
| 83 // views::View | 83 // views::View |
| 84 void PaintChildren(const PaintContext& context) override; | 84 void PaintChildren(const ui::PaintContext& context) override; |
| 85 void OnPaint(gfx::Canvas* canvas) override; | 85 void OnPaint(gfx::Canvas* canvas) override; |
| 86 | 86 |
| 87 void set_fade_everything(bool fade_everything) { | 87 void set_fade_everything(bool fade_everything) { |
| 88 fade_everything_ = fade_everything; | 88 fade_everything_ = fade_everything; |
| 89 } | 89 } |
| 90 void SetOpacity(double opacity); | 90 void SetOpacity(double opacity); |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 // Controls whether the background and border are faded out as well. Default | 93 // Controls whether the background and border are faded out as well. Default |
| 94 // is false, meaning only children are faded. | 94 // is false, meaning only children are faded. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 gfx::SlideAnimation overlay_animation_; | 140 gfx::SlideAnimation overlay_animation_; |
| 141 | 141 |
| 142 base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_; | 142 base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_; |
| 143 | 143 |
| 144 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews); | 144 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace autofill | 147 } // namespace autofill |
| 148 | 148 |
| 149 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ | 149 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ |
| OLD | NEW |