Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.h

Issue 1064213002: views: Change CardUnmaskPromptViews::FadeOutView opacity to alpha. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alpha-view: between Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 FadeOutView(); 80 FadeOutView();
81 ~FadeOutView() override; 81 ~FadeOutView() override;
82 82
83 // views::View 83 // views::View
84 void PaintChildren(const ui::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
91 // Set the alpha channel for this view. 0 is transparent and 255 is opaque.
92 void SetAlpha(uint8_t alpha);
91 93
92 private: 94 private:
93 // Controls whether the background and border are faded out as well. Default 95 // Controls whether the background and border are faded out as well. Default
94 // is false, meaning only children are faded. 96 // is false, meaning only children are faded.
95 bool fade_everything_; 97 bool fade_everything_;
96 98
97 // On a scale of 0-1, how much to fade out the contents of this view. 0 is 99 // The alpha channel for this view. 0 is transparent and 255 is opaque.
98 // totally invisible, 1 is totally visible. 100 uint8_t alpha_;
99 double opacity_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(FadeOutView); 102 DISALLOW_COPY_AND_ASSIGN(FadeOutView);
102 }; 103 };
103 104
104 void InitIfNecessary(); 105 void InitIfNecessary();
105 void SetRetriableErrorMessage(const base::string16& message); 106 void SetRetriableErrorMessage(const base::string16& message);
106 bool ExpirationDateIsValid() const; 107 bool ExpirationDateIsValid() const;
107 void SetInputsEnabled(bool enabled); 108 void SetInputsEnabled(bool enabled);
108 void ClosePrompt(); 109 void ClosePrompt();
109 110
(...skipping 30 matching lines...) Expand all
140 gfx::SlideAnimation overlay_animation_; 141 gfx::SlideAnimation overlay_animation_;
141 142
142 base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_; 143 base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_;
143 144
144 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews); 145 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews);
145 }; 146 };
146 147
147 } // namespace autofill 148 } // namespace autofill
148 149
149 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_ 150 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_CARD_UNMASK_PROMPT_VIEWS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698