Commit da111ca7 authored by groby@chromium.org's avatar groby@chromium.org

Use existing model for initial layout, if we can.

BUG=128880
TEST=Try to repro the bug (with an empty profile), see it doesn't happen.

Review URL: https://chromiumcodereview.appspot.com/10413044

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138283 0039d316-1c4b-4281-b951-d872f2087c98
parent 2b32c50d
...@@ -33,6 +33,8 @@ class WebIntentPickerCocoa : public WebIntentPicker, ...@@ -33,6 +33,8 @@ class WebIntentPickerCocoa : public WebIntentPicker,
void OnSheetDidEnd(NSWindow* sheet); void OnSheetDidEnd(NSWindow* sheet);
WebIntentPickerModel* model() { return model_; }
// WebIntentPickerDelegate forwarding API. // WebIntentPickerDelegate forwarding API.
void OnCancelled(); void OnCancelled();
void OnServiceChosen(size_t index); void OnServiceChosen(size_t index);
......
...@@ -459,8 +459,10 @@ NSButton* CreateHyperlinkButton(NSString* title, const NSRect& frame) { ...@@ -459,8 +459,10 @@ NSButton* CreateHyperlinkButton(NSString* title, const NSRect& frame) {
if ((self = [super initWithWindow:window.get()])) { if ((self = [super initWithWindow:window.get()])) {
picker_ = picker; picker_ = picker;
if (picker)
model_ = picker->model();
intentButtons_.reset([[NSMutableArray alloc] init]); intentButtons_.reset([[NSMutableArray alloc] init]);
[self performLayoutWithModel:NULL]; [self performLayoutWithModel:model_];
[[self window] makeFirstResponder:self]; [[self window] makeFirstResponder:self];
} }
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