| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_ |
| 7 |
| 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
| 11 #import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h" |
| 12 #include "chrome/browser/ui/passwords/account_chooser_prompt.h" |
| 13 |
| 14 class PasswordPromptViewBridge : public AccountChooserPrompt, |
| 15 public ConstrainedWindowMacDelegate, |
| 16 public AccountChooserBridge { |
| 17 public: |
| 18 PasswordPromptViewBridge(PasswordDialogController* controller, |
| 19 content::WebContents* web_contents); |
| 20 ~PasswordPromptViewBridge() override; |
| 21 |
| 22 // AccountChooserPrompt: |
| 23 void Show() override; |
| 24 void ControllerGone() override; |
| 25 |
| 26 // ConstrainedWindowMacDelegate: |
| 27 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; |
| 28 |
| 29 // AccountChooserBridge: |
| 30 void PerformClose() override; |
| 31 PasswordDialogController* GetDialogController() override; |
| 32 net::URLRequestContextGetter* GetRequestContext() const override; |
| 33 |
| 34 private: |
| 35 PasswordDialogController* controller_; |
| 36 content::WebContents* web_contents_; |
| 37 |
| 38 scoped_ptr<ConstrainedWindowMac> constrained_window_; |
| 39 base::scoped_nsobject<NSViewController> view_controller_; |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_ |
| OLD | NEW |