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

Unified Diff: chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h

Issue 1610653002: Integrate the account chooser dialog on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
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..2d61846995a2fc9cb15ac55036f406481fc3d9af
--- /dev/null
+++ b/chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// 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_

Powered by Google App Engine
This is Rietveld 408576698