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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm

Issue 21692002: Rename AutofillDialogController to AutofillDialogViewDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 11 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
12 #include "components/autofill/content/browser/wallet/wallet_service_url.h" 12 #include "components/autofill/content/browser/wallet/wallet_service_url.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/browser/web_contents_view.h" 14 #include "content/public/browser/web_contents_view.h"
15 15
16 @implementation AutofillSignInContainer 16 @implementation AutofillSignInContainer
17 17
18 - (id)initWithController:(autofill::AutofillDialogController*)controller { 18 - (id)initWithDelegate:(autofill::AutofillDialogViewDelegate*)delegate {
19 if (self = [super init]) { 19 if (self = [super init]) {
20 controller_ = controller; 20 delegate_ = delegate;
21 } 21 }
22 return self; 22 return self;
23 } 23 }
24 24
25 - (void)loadView { 25 - (void)loadView {
26 webContents_.reset( 26 webContents_.reset(
27 content::WebContents::Create( 27 content::WebContents::Create(
28 content::WebContents::CreateParams(controller_->profile()))); 28 content::WebContents::CreateParams(delegate_->profile())));
29 NSView* webContentView = webContents_->GetView()->GetNativeView(); 29 NSView* webContentView = webContents_->GetView()->GetNativeView();
30 [self setView:webContentView]; 30 [self setView:webContentView];
31 } 31 }
32 32
33 - (void)loadSignInPage { 33 - (void)loadSignInPage {
34 DCHECK(webContents_.get()); 34 DCHECK(webContents_.get());
35 webContents_->GetController().LoadURL( 35 webContents_->GetController().LoadURL(
36 autofill::wallet::GetSignInUrl(), 36 autofill::wallet::GetSignInUrl(),
37 content::Referrer(), 37 content::Referrer(),
38 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 38 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
39 std::string()); 39 std::string());
40 } 40 }
41 41
42 - (content::NavigationController*)navigationController { 42 - (content::NavigationController*)navigationController {
43 return &webContents_->GetController(); 43 return &webContents_->GetController();
44 } 44 }
45 45
46 @end 46 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698