blob: 6da3fb8f0ed899f0a551cca027d4589ffbdee2e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// 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/password_prompt_bridge_interface.h"
#include "chrome/browser/ui/passwords/password_dialog_prompts.h"
@class AccountChooserViewController;
class PasswordPromptViewBridge : public AccountChooserPrompt,
public AutoSigninFirstRunPrompt,
public ConstrainedWindowMacDelegate,
public PasswordPromptBridgeInterface {
public:
PasswordPromptViewBridge(PasswordDialogController* controller,
content::WebContents* web_contents);
~PasswordPromptViewBridge() override;
// AccountChooserPrompt:
void ShowAccountChooser() override;
void ControllerGone() override;
// AutoSigninFirstRunPrompt:
void ShowAutoSigninPrompt() override;
// ConstrainedWindowMacDelegate:
void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override;
// PasswordPromptBridgeInterface:
void PerformClose() override;
PasswordDialogController* GetDialogController() override;
net::URLRequestContextGetter* GetRequestContext() const override;
private:
void ShowWindow();
PasswordDialogController* controller_;
content::WebContents* web_contents_;
scoped_ptr<ConstrainedWindowMac> constrained_window_;
base::scoped_nsobject<NSViewController<PasswordPromptViewInterface>>
view_controller_;
};
#endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORD_PROMPT_VIEW_BRIDGE_H_
|