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

Unified Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.h

Issue 1021913004: views - fade out more cvc prompt elements during verification process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
diff --git a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
index fa1f442083d1d4a04b73f513958d8763eb07a22b..709fa28f35ad922144416c39865397dea90b9732 100644
--- a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
+++ b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
@@ -7,6 +7,8 @@
#include "chrome/browser/ui/autofill/autofill_dialog_models.h"
#include "chrome/browser/ui/autofill/card_unmask_prompt_view.h"
+#include "ui/gfx/animation/animation_delegate.h"
+#include "ui/gfx/animation/slide_animation.h"
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/window/dialog_delegate.h"
@@ -23,7 +25,8 @@ class DecoratedTextfield;
class CardUnmaskPromptViews : public CardUnmaskPromptView,
views::ComboboxListener,
views::DialogDelegateView,
- views::TextfieldController {
+ views::TextfieldController,
+ gfx::AnimationDelegate {
public:
explicit CardUnmaskPromptViews(CardUnmaskPromptController* controller);
@@ -63,9 +66,40 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
// views::ComboboxListener
void OnPerformAction(views::Combobox* combobox) override;
+ // gfx::AnimationDelegate
+ void AnimationProgressed(const gfx::Animation* animation) override;
+
private:
friend class CardUnmaskPromptViewTesterViews;
+ // A view that allows changing the opacity of its contents.
+ class FadeOutView : public views::View {
+ public:
+ FadeOutView();
+ ~FadeOutView() override;
+
+ // views::View
+ void PaintChildren(gfx::Canvas* canvas,
+ const views::CullSet& cull_set) override;
+ void OnPaint(gfx::Canvas* canvas) override;
+
+ void set_fade_everything(bool fade_everything) {
+ fade_everything_ = fade_everything;
+ }
+ void SetOpacity(double opacity);
+
+ private:
+ // Controls whether the background and border are faded out as well. Default
+ // is false, meaning only children are faded.
+ bool fade_everything_;
+
+ // On a scale of 0-1, how much to fade out the contents of this view. 0 is
+ // totally invisible, 1 is totally visible.
+ double opacity_;
+
+ DISALLOW_COPY_AND_ASSIGN(FadeOutView);
+ };
+
void InitIfNecessary();
void SetRetriableErrorMessage(const base::string16& message);
bool ExpirationDateIsValid() const;
@@ -79,6 +113,9 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
// The error label for permanent errors (where the user can't retry).
views::Label* permanent_error_label_;
+ // Holds the cvc and expiration inputs.
+ views::View* input_row_;
+
DecoratedTextfield* cvc_input_;
// These will be null when expiration date is not required.
@@ -91,11 +128,14 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
// The error label for most errors, which lives beneath the inputs.
views::Label* error_label_;
+ FadeOutView* storage_row_;
views::Checkbox* storage_checkbox_;
- views::View* progress_overlay_;
+ FadeOutView* progress_overlay_;
views::Label* progress_label_;
+ gfx::SlideAnimation overlay_animation_;
+
base::WeakPtrFactory<CardUnmaskPromptViews> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViews);
« 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