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

Side by Side Diff: chrome/browser/ui/autofill/save_card_bubble_controller_impl.h

Issue 1402363013: Update location bar bubble/icon behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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
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_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/timer/elapsed_timer.h" 10 #include "base/timer/elapsed_timer.h"
(...skipping 10 matching lines...) Expand all
21 // depending upon whether upstreaming is available. 21 // depending upon whether upstreaming is available.
22 class SaveCardBubbleControllerImpl 22 class SaveCardBubbleControllerImpl
23 : public SaveCardBubbleController, 23 : public SaveCardBubbleController,
24 public content::WebContentsObserver, 24 public content::WebContentsObserver,
25 public content::WebContentsUserData<SaveCardBubbleControllerImpl> { 25 public content::WebContentsUserData<SaveCardBubbleControllerImpl> {
26 public: 26 public:
27 // |save_card_callback| will be invoked if/when the Save button is pressed. 27 // |save_card_callback| will be invoked if/when the Save button is pressed.
28 void SetCallback(const base::Closure& save_card_callback); 28 void SetCallback(const base::Closure& save_card_callback);
29 29
30 // SetCallback() must be called first. 30 // SetCallback() must be called first.
31 void ShowBubble(); 31 void ShowBubble(bool user_action);
32 32
33 // Returns true if Omnibox save credit card icon should be visible. 33 // Returns true if Omnibox save credit card icon should be visible.
34 bool IsIconVisible() const; 34 bool IsIconVisible() const;
35 35
36 // Returns true if Omnibox save credit card should be shown in its "toggled
37 // on" state.
38 bool IsIconToggled() const;
39
40 // Returns nullptr if no bubble is currently shown. 36 // Returns nullptr if no bubble is currently shown.
41 SaveCardBubbleView* save_card_bubble_view() const; 37 SaveCardBubbleView* save_card_bubble_view() const;
42 38
43 // SaveCardBubbleController: 39 // SaveCardBubbleController:
44 void OnSaveButton() override; 40 void OnSaveButton() override;
45 void OnCancelButton() override; 41 void OnCancelButton() override;
46 void OnLearnMoreClicked() override; 42 void OnLearnMoreClicked() override;
47 void OnBubbleClosed() override; 43 void OnBubbleClosed() override;
48 44
49 private: 45 private:
(...skipping 21 matching lines...) Expand all
71 // Used to measure the amount of time on a page; if it's less than some 67 // Used to measure the amount of time on a page; if it's less than some
72 // reasonable limit, then don't close the bubble upon navigation. 68 // reasonable limit, then don't close the bubble upon navigation.
73 scoped_ptr<base::ElapsedTimer> timer_; 69 scoped_ptr<base::ElapsedTimer> timer_;
74 70
75 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl); 71 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl);
76 }; 72 };
77 73
78 } // namespace autofill 74 } // namespace autofill
79 75
80 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 76 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698