| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 95 bool fade_everything_; | 95 bool fade_everything_; |
| 96 | 96 |
| 97 // On a scale of 0-1, how much to fade out the contents of this view. 0 is | 97 // The alpha channel for this view. 0 is transparent and 255 is opaque, and |
| 98 // totally invisible, 1 is totally visible. | 98 // the value should always be inside that range. |
| 99 double opacity_; | 99 int alpha_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(FadeOutView); | 101 DISALLOW_COPY_AND_ASSIGN(FadeOutView); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 void InitIfNecessary(); | 104 void InitIfNecessary(); |
| 105 void SetRetriableErrorMessage(const base::string16& message); | 105 void SetRetriableErrorMessage(const base::string16& message); |
| 106 bool ExpirationDateIsValid() const; | 106 bool ExpirationDateIsValid() const; |
| 107 void SetInputsEnabled(bool enabled); | 107 void SetInputsEnabled(bool enabled); |
| 108 void ClosePrompt(); | 108 void ClosePrompt(); |
| 109 | 109 |
| (...skipping 30 matching lines...) Expand all 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 |