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, ...@@ -48,15 +48,12 @@ class CardUnmaskPromptViewBridge : public CardUnmaskPromptView,
@interface CardUnmaskPromptViewCocoa : NSViewController<NSWindowDelegate> { @interface CardUnmaskPromptViewCocoa : NSViewController<NSWindowDelegate> {
@private @private
content::WebContents* webContents_;
// Owns |self|. // Owns |self|.
autofill::CardUnmaskPromptViewBridge* bridge_; autofill::CardUnmaskPromptViewBridge* bridge_;
} }
// Designated initializer. |webContents| and |bridge| must not be NULL. // Designated initializer. |bridge| must not be NULL.
- (id)initWithWebContents:(content::WebContents*)webContents - (id)initWithBridge:(autofill::CardUnmaskPromptViewBridge*)bridge;
bridge:(autofill::CardUnmaskPromptViewBridge*)bridge;
// Closes the sheet and ends the modal loop. // Closes the sheet and ends the modal loop.
- (IBAction)closeSheet:(id)sender; - (IBAction)closeSheet:(id)sender;
......
...@@ -38,9 +38,8 @@ CardUnmaskPromptView* CardUnmaskPromptView::CreateAndShow( ...@@ -38,9 +38,8 @@ CardUnmaskPromptView* CardUnmaskPromptView::CreateAndShow(
CardUnmaskPromptViewBridge::CardUnmaskPromptViewBridge( CardUnmaskPromptViewBridge::CardUnmaskPromptViewBridge(
CardUnmaskPromptController* controller) CardUnmaskPromptController* controller)
: controller_(controller) { : controller_(controller) {
view_controller_.reset([[CardUnmaskPromptViewCocoa alloc] view_controller_.reset(
initWithWebContents:controller_->GetWebContents() [[CardUnmaskPromptViewCocoa alloc] initWithBridge:this]);
bridge:this]);
// Setup the constrained window that will show the view. // Setup the constrained window that will show the view.
base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc] base::scoped_nsobject<NSWindow> window([[ConstrainedWindowCustomWindow alloc]
...@@ -121,15 +120,12 @@ void CardUnmaskPromptViewBridge::PerformClose() { ...@@ -121,15 +120,12 @@ void CardUnmaskPromptViewBridge::PerformClose() {
} }
} }
- (id)initWithWebContents:(content::WebContents*)webContents - (id)initWithBridge:(autofill::CardUnmaskPromptViewBridge*)bridge {
bridge:(autofill::CardUnmaskPromptViewBridge*)bridge {
DCHECK(webContents);
DCHECK(bridge); DCHECK(bridge);
if ((self = [super initWithNibName:nil bundle:nil])) { if ((self = [super initWithNibName:nil bundle:nil]))
webContents_ = webContents;
bridge_ = bridge; bridge_ = bridge;
}
return self; 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