Skip to content

Commit

Permalink
Add explanation text and legal message footer to upload bubble.
Browse files Browse the repository at this point in the history
BUG=566271

Review URL: https://codereview.chromium.org/1757103002

Cr-Commit-Position: refs/heads/master@{#379655}
(cherry picked from commit 319c897)

Review URL: https://codereview.chromium.org/1783833002 .

Cr-Commit-Position: refs/branch-heads/2661@{crosswalk-project#172}
Cr-Branched-From: ef6f6ae-refs/heads/master@{#378081}
  • Loading branch information
justindonnelly committed Mar 10, 2016
1 parent 41af1dd commit 473abc6
Show file tree
Hide file tree
Showing 3 changed files with 265 additions and 72 deletions.
11 changes: 11 additions & 0 deletions chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "chrome/browser/ui/autofill/save_card_bubble_view.h"
#include "chrome/browser/ui/cocoa/base_bubble_controller.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/legal_message_line.h"

@class BrowserWindowController;
@class SaveCardBubbleViewCocoa;
Expand All @@ -28,13 +29,22 @@ class SaveCardBubbleViewBridge : public SaveCardBubbleView {
// Returns the title that should be displayed in the bubble.
base::string16 GetWindowTitle() const;

// Returns the explanatory text that should be displayed in the bubble.
// Returns an empty string if no message should be displayed.
base::string16 GetExplanatoryMessage() const;

// Returns the card that will be uploaded if the user accepts.
CreditCard GetCard() const;

// Returns the legal messages that should be displayed in the footer. Result
// will be empty if no legal message should be shown.
const LegalMessageLines GetLegalMessageLines() const;

// Interaction.
void OnSaveButton();
void OnCancelButton();
void OnLearnMoreClicked();
void OnLegalMessageLinkClicked(const GURL& url);
void OnBubbleClosed();

// SaveCardBubbleView implementation:
Expand All @@ -44,6 +54,7 @@ class SaveCardBubbleViewBridge : public SaveCardBubbleView {
FRIEND_TEST_ALL_PREFIXES(SaveCardBubbleViewTest, SaveShouldClose);
FRIEND_TEST_ALL_PREFIXES(SaveCardBubbleViewTest, CancelShouldClose);
FRIEND_TEST_ALL_PREFIXES(SaveCardBubbleViewTest, LearnMoreShouldNotClose);
FRIEND_TEST_ALL_PREFIXES(SaveCardBubbleViewTest, LegalMessageShouldNotClose);
FRIEND_TEST_ALL_PREFIXES(SaveCardBubbleViewTest, ReturnInvokesDefaultAction);
FRIEND_TEST_ALL_PREFIXES(SaveCardBubbleViewTest, EscapeCloses);

Expand Down
Loading

0 comments on commit 473abc6

Please sign in to comment.