Commit 1203a7ec authored by bondd's avatar bondd Committed by Commit bot

Autofill OSX: Rename initWithWebContents -> initWithBridge.

Rename initWithWebContents -> initWithBridge and remove |webContents_|
because it is never used.

BUG=448572

Review URL: https://codereview.chromium.org/983833004

Cr-Commit-Position: refs/heads/master@{#319675}
parent 4ef352de
......@@ -48,15 +48,12 @@ class CardUnmaskPromptViewBridge : public CardUnmaskPromptView,
@interface CardUnmaskPromptViewCocoa : NSViewController<NSWindowDelegate> {
@private
content::WebContents* webContents_;
// Owns |self|.
autofill::CardUnmaskPromptViewBridge* bridge_;
}
// Designated initializer. |webContents| and |bridge| must not be NULL.
- (id)initWithWebContents:(content::WebContents*)webContents
bridge:(autofill::CardUnmaskPromptViewBridge*)bridge;
// Designated initializer. |bridge| must not be NULL.
- (id)initWithBridge:(autofill::CardUnmaskPromptViewBridge*)bridge;
// Closes the sheet and ends the modal loop.
- (IBAction)closeSheet:(id)sender;
......
......@@ -38,9 +38,8 @@ CardUnmaskPromptView* CardUnmaskPromptView::CreateAndShow(
CardUnmaskPromptViewBridge::CardUnmaskPromptViewBridge(
CardUnmaskPromptController* controller)
: controller_(controller) {
view_controller_.reset([[CardUnmaskPromptViewCocoa alloc]
initWithWebContents:controller_->GetWebContents()
bridge:this]);
view_controller_.reset(
[[CardUnmaskPromptViewCocoa alloc] initWithBridge:this]);
// Setup the constrained window that will show the view.
base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
......@@ -121,15 +120,12 @@ void CardUnmaskPromptViewBridge::PerformClose() {
}
}
- (id)initWithWebContents:(content::WebContents*)webContents
bridge:(autofill::CardUnmaskPromptViewBridge*)bridge {
DCHECK(webContents);
- (id)initWithBridge:(autofill::CardUnmaskPromptViewBridge*)bridge {
DCHECK(bridge);
if ((self = [super initWithNibName:nil bundle:nil])) {
webContents_ = webContents;
if ((self = [super initWithNibName:nil bundle:nil]))
bridge_ = bridge;
}
return self;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment