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