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

Unified Diff: chrome/browser/ui/views/location_bar/autofill_credit_card_view.cc

Issue 21668003: Implement newly saved card bubble for realz and update generated card bubble to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 4 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
Index: chrome/browser/ui/views/location_bar/autofill_credit_card_view.cc
diff --git a/chrome/browser/ui/views/location_bar/autofill_credit_card_view.cc b/chrome/browser/ui/views/location_bar/autofill_credit_card_view.cc
deleted file mode 100644
index 21e7208a784ea72f5ac869aa016e1fec718fe6a1..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/location_bar/autofill_credit_card_view.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/location_bar/autofill_credit_card_view.h"
-
-#include "chrome/browser/ui/autofill/autofill_credit_card_bubble_controller.h"
-#include "chrome/browser/ui/toolbar/toolbar_model.h"
-#include "ui/gfx/image/image.h"
-
-AutofillCreditCardView::AutofillCreditCardView(
- ToolbarModel* toolbar_model,
- LocationBarView::Delegate* delegate)
- : toolbar_model_(toolbar_model),
- delegate_(delegate) {
- Update();
-}
-
-AutofillCreditCardView::~AutofillCreditCardView() {}
-
-void AutofillCreditCardView::Update() {
- autofill::AutofillCreditCardBubbleController* controller = GetController();
- if (controller && !controller->AnchorIcon().IsEmpty()) {
- SetVisible(true);
- SetImage(controller->AnchorIcon().AsImageSkia());
- } else {
- SetVisible(false);
- SetImage(NULL);
- }
-}
-
-// TODO(dbeam): figure out what to do for a tooltip and accessibility.
-
-bool AutofillCreditCardView::CanHandleClick() const {
- autofill::AutofillCreditCardBubbleController* controller = GetController();
- return controller && !controller->IsHiding();
-}
-
-void AutofillCreditCardView::OnClick() {
- autofill::AutofillCreditCardBubbleController* controller = GetController();
- if (controller)
- controller->OnAnchorClicked();
-}
-
-autofill::AutofillCreditCardBubbleController* AutofillCreditCardView::
- GetController() const {
- content::WebContents* wc = delegate_->GetWebContents();
- if (!wc || toolbar_model_->GetInputInProgress())
- return NULL;
-
- return autofill::AutofillCreditCardBubbleController::FromWebContents(wc);
-}

Powered by Google App Engine
This is Rietveld 408576698