diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-22 16:56:16 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-22 16:56:16 +0000 |
commit | da111ca709eea2961ef43b1f57a37b736fcd0d30 (patch) | |
tree | 8ec311911ecfcb3665d979bb941ed0bd992a4f3f | |
parent | 2b32c50d7cc0c371a41ce3e32c88d2ca55fc95d3 (diff) | |
download | chromium_src-da111ca709eea2961ef43b1f57a37b736fcd0d30.zip chromium_src-da111ca709eea2961ef43b1f57a37b736fcd0d30.tar.gz chromium_src-da111ca709eea2961ef43b1f57a37b736fcd0d30.tar.bz2 |
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
-rw-r--r-- | chrome/browser/ui/cocoa/web_intent_picker_cocoa.h | 2 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/web_intent_sheet_controller.mm | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.h b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.h index 94b5733..8a158d2 100644 --- a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.h +++ b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.h @@ -33,6 +33,8 @@ class WebIntentPickerCocoa : public WebIntentPicker, void OnSheetDidEnd(NSWindow* sheet); + WebIntentPickerModel* model() { return model_; } + // WebIntentPickerDelegate forwarding API. void OnCancelled(); void OnServiceChosen(size_t index); diff --git a/chrome/browser/ui/cocoa/web_intent_sheet_controller.mm b/chrome/browser/ui/cocoa/web_intent_sheet_controller.mm index d016793..de59640 100644 --- a/chrome/browser/ui/cocoa/web_intent_sheet_controller.mm +++ b/chrome/browser/ui/cocoa/web_intent_sheet_controller.mm @@ -459,8 +459,10 @@ NSButton* CreateHyperlinkButton(NSString* title, const NSRect& frame) { if ((self = [super initWithWindow:window.get()])) { picker_ = picker; + if (picker) + model_ = picker->model(); intentButtons_.reset([[NSMutableArray alloc] init]); - [self performLayoutWithModel:NULL]; + [self performLayoutWithModel:model_]; [[self window] makeFirstResponder:self]; } return self; |