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

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

Issue 1759453002: Convert location bar bubble delegates to bubble dialog delegates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ImmersiveFullscreenController Created 4 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 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_VIEWS_AUTOFILL_SAVE_CARD_ICON_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_ICON_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_ICON_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_ICON_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
10 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" 10 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h"
11 11
12 class Browser; 12 class Browser;
13 class CommandUpdater; 13 class CommandUpdater;
14 14
15 namespace autofill { 15 namespace autofill {
16 16
17 class SaveCardBubbleControllerImpl; 17 class SaveCardBubbleControllerImpl;
18 18
19 // The location bar icon to show the Save Credit Card bubble where the user can 19 // The location bar icon to show the Save Credit Card bubble where the user can
20 // choose to save the credit card info to use again later without re-entering 20 // choose to save the credit card info to use again later without re-entering
21 // it. 21 // it.
22 class SaveCardIconView : public BubbleIconView, public TabStripModelObserver { 22 class SaveCardIconView : public BubbleIconView, public TabStripModelObserver {
23 public: 23 public:
24 explicit SaveCardIconView(CommandUpdater* command_updater, Browser* browser); 24 explicit SaveCardIconView(CommandUpdater* command_updater, Browser* browser);
25 ~SaveCardIconView() override; 25 ~SaveCardIconView() override;
26 26
27 protected: 27 protected:
28 // BubbleIconView: 28 // BubbleIconView:
29 void OnExecuting(BubbleIconView::ExecuteSource execute_source) override; 29 void OnExecuting(BubbleIconView::ExecuteSource execute_source) override;
30 views::BubbleDelegateView* GetBubble() const override; 30 views::BubbleDialogDelegateView* GetBubble() const override;
31 gfx::VectorIconId GetVectorIcon() const override; 31 gfx::VectorIconId GetVectorIcon() const override;
32 32
33 // TabStripModelObserver: 33 // TabStripModelObserver:
34 void TabDeactivated(content::WebContents* contents) override; 34 void TabDeactivated(content::WebContents* contents) override;
35 35
36 private: 36 private:
37 SaveCardBubbleControllerImpl* GetController() const; 37 SaveCardBubbleControllerImpl* GetController() const;
38 38
39 // May be nullptr. 39 // May be nullptr.
40 Browser* browser_; 40 Browser* browser_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(SaveCardIconView); 42 DISALLOW_COPY_AND_ASSIGN(SaveCardIconView);
43 }; 43 };
44 44
45 } // namespace autofill 45 } // namespace autofill
46 46
47 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_ICON_VIEW_H_ 47 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_SAVE_CARD_ICON_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698