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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h

Issue 904613006: Autofill: First step toward CVC unmask prompt dialog on OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove view_tester files and don't return WeakPtrs. Created 5 years, 10 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
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_
7
8 #include "base/mac/scoped_nsobject.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h"
11 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
12
13 namespace content {
14 class NavigationController;
15 }
16
17 @class CardUnmaskPromptViewCocoa;
18
19 namespace autofill {
20
21 class CardUnmaskPromptViewBridge : public CardUnmaskPromptView,
22 public ConstrainedWindowMacDelegate {
23 public:
24 explicit CardUnmaskPromptViewBridge(CardUnmaskPromptController* controller);
25 ~CardUnmaskPromptViewBridge() override;
26
27 // CardUnmaskPromptView implementation:
28 void ControllerGone() override;
29 void DisableAndWaitForVerification() override;
30 void GotVerificationResult(bool success) override;
31
32 // ConstrainedWindowMacDelegate implementation:
33 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override;
34
35 void PerformClose();
36
37 private:
38 scoped_ptr<ConstrainedWindowMac> constrained_window_;
39 base::scoped_nsobject<CardUnmaskPromptViewCocoa> sheet_controller_;
40
41 // The controller |this| queries for logic and state.
42 CardUnmaskPromptController* controller_;
43 };
44
45 } // autofill
46
47 @interface CardUnmaskPromptViewCocoa : NSWindowController<NSWindowDelegate> {
48 @private
49 content::WebContents* webContents_;
50
51 // Owns |self|.
52 autofill::CardUnmaskPromptViewBridge* bridge_;
53 }
54
55 // Designated initializer. |webContents| and |bridge| must not be NULL.
56 - (id)initWithWebContents:(content::WebContents*)webContents
57 bridge:(autofill::CardUnmaskPromptViewBridge*)bridge;
58
59 // Closes the sheet and ends the modal loop.
60 - (IBAction)closeSheet:(id)sender;
61
62 @end
63
64 #endif // CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698