| 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 #include "chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h" | 5 #include "chrome/browser/ui/cocoa/passwords/password_prompt_view_bridge.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" | 8 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh
eet.h" |
| 9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" | 9 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_wi
ndow.h" |
| 10 #import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h" | 10 #import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 GetRequestContext(); | 62 GetRequestContext(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void PasswordPromptViewBridge::ShowWindow() { | 65 void PasswordPromptViewBridge::ShowWindow() { |
| 66 // Setup the constrained window that will show the view. | 66 // Setup the constrained window that will show the view. |
| 67 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] | 67 base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] |
| 68 initWithContentRect:[[view_controller_ view] bounds]]); | 68 initWithContentRect:[[view_controller_ view] bounds]]); |
| 69 [window setContentView:[view_controller_ view]]; | 69 [window setContentView:[view_controller_ view]]; |
| 70 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( | 70 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( |
| 71 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]); | 71 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window]); |
| 72 constrained_window_.reset( | 72 constrained_window_ = |
| 73 new ConstrainedWindowMac(this, web_contents_, sheet)); | 73 CreateAndShowWebModalDialogMac(this, web_contents_, sheet); |
| 74 } | 74 } |
| 75 | 75 |
| 76 AccountChooserPrompt* CreateAccountChooserPromptView( | 76 AccountChooserPrompt* CreateAccountChooserPromptView( |
| 77 PasswordDialogController* controller, content::WebContents* web_contents) { | 77 PasswordDialogController* controller, content::WebContents* web_contents) { |
| 78 return new PasswordPromptViewBridge(controller, web_contents); | 78 return new PasswordPromptViewBridge(controller, web_contents); |
| 79 } | 79 } |
| 80 | 80 |
| 81 AutoSigninFirstRunPrompt* CreateAutoSigninPromptView( | 81 AutoSigninFirstRunPrompt* CreateAutoSigninPromptView( |
| 82 PasswordDialogController* controller, content::WebContents* web_contents) { | 82 PasswordDialogController* controller, content::WebContents* web_contents) { |
| 83 return new PasswordPromptViewBridge(controller, web_contents); | 83 return new PasswordPromptViewBridge(controller, web_contents); |
| 84 } | 84 } |
| 85 | 85 |
| OLD | NEW |