Index: chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h |
diff --git a/chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h b/chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fdadd3b740aad28b1659571e88d1b8bb18535c2a |
--- /dev/null |
+++ b/chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
vabr (Chromium)
2016/01/21 10:02:10
nit: No "(c)" in the copyright message.
http://de
vasilii
2016/01/21 12:48:50
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_ |
+#define CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_ |
+ |
+#include "base/mac/scoped_nsobject.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
+#import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h" |
+#include "chrome/browser/ui/passwords/account_chooser_prompt.h" |
+ |
+class PasswordPromptViewBridge : public AccountChooserPrompt, |
+ public ConstrainedWindowMacDelegate, |
+ public AccountChooserBridge { |
+ public: |
+ PasswordPromptViewBridge(PasswordDialogController* controller, |
+ content::WebContents* web_contents); |
+ ~PasswordPromptViewBridge() override; |
+ |
+ // AccountChooserPrompt: |
+ void Show() override; |
+ void ControllerGone() override; |
+ |
+ // ConstrainedWindowMacDelegate: |
+ void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; |
+ |
+ // AccountChooserBridge: |
+ void PerformClose() override; |
+ PasswordDialogController* GetDialogController() override; |
+ net::URLRequestContextGetter* GetRequestContext() const override; |
+ |
+ private: |
+ PasswordDialogController* controller_; |
+ content::WebContents* web_contents_; |
+ |
+ scoped_ptr<ConstrainedWindowMac> constrained_window_; |
+ base::scoped_nsobject<NSViewController> view_controller_; |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_ |