| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 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 | 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_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_ |
| 7 | 7 |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" | 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_view.h" |
| 11 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" | 11 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 class NavigationController; | 14 class NavigationController; |
| 15 } | 15 } |
| 16 | 16 |
| 17 @class CardUnmaskPromptViewCocoa; | 17 @class CardUnmaskPromptViewCocoa; |
| 18 | 18 |
| 19 namespace autofill { | 19 namespace autofill { |
| 20 | 20 |
| 21 class CardUnmaskPromptViewBridge : public CardUnmaskPromptView, | 21 class CardUnmaskPromptViewBridge : public CardUnmaskPromptView, |
| 22 public ConstrainedWindowMacDelegate { | 22 public ConstrainedWindowMacDelegate { |
| 23 public: | 23 public: |
| 24 explicit CardUnmaskPromptViewBridge(CardUnmaskPromptController* controller); | 24 explicit CardUnmaskPromptViewBridge(CardUnmaskPromptController* controller); |
| 25 ~CardUnmaskPromptViewBridge() override; | 25 ~CardUnmaskPromptViewBridge() override; |
| 26 | 26 |
| 27 // CardUnmaskPromptView implementation: | 27 // CardUnmaskPromptView implementation: |
| 28 void ControllerGone() override; | 28 void ControllerGone() override; |
| 29 void DisableAndWaitForVerification() override; | 29 void DisableAndWaitForVerification() override; |
| 30 void GotVerificationResult(bool success) override; | 30 void GotVerificationResult(const base::string16& error_message, |
| 31 bool allow_retry) override; |
| 31 | 32 |
| 32 // ConstrainedWindowMacDelegate implementation: | 33 // ConstrainedWindowMacDelegate implementation: |
| 33 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; | 34 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; |
| 34 | 35 |
| 35 void PerformClose(); | 36 void PerformClose(); |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 scoped_ptr<ConstrainedWindowMac> constrained_window_; | 39 scoped_ptr<ConstrainedWindowMac> constrained_window_; |
| 39 base::scoped_nsobject<CardUnmaskPromptViewCocoa> sheet_controller_; | 40 base::scoped_nsobject<CardUnmaskPromptViewCocoa> sheet_controller_; |
| 40 | 41 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 55 // Designated initializer. |webContents| and |bridge| must not be NULL. | 56 // Designated initializer. |webContents| and |bridge| must not be NULL. |
| 56 - (id)initWithWebContents:(content::WebContents*)webContents | 57 - (id)initWithWebContents:(content::WebContents*)webContents |
| 57 bridge:(autofill::CardUnmaskPromptViewBridge*)bridge; | 58 bridge:(autofill::CardUnmaskPromptViewBridge*)bridge; |
| 58 | 59 |
| 59 // Closes the sheet and ends the modal loop. | 60 // Closes the sheet and ends the modal loop. |
| 60 - (IBAction)closeSheet:(id)sender; | 61 - (IBAction)closeSheet:(id)sender; |
| 61 | 62 |
| 62 @end | 63 @end |
| 63 | 64 |
| 64 #endif // CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_ | 65 #endif // CHROME_BROWSER_UI_COCOA_CARD_UNMASK_PROMPT_VIEW_BRIDGE_H_ |
| OLD | NEW |