summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 22:07:06 +0000
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 22:07:06 +0000
commit45a3f1d3cca7961e7ca1d59b67a8f687b148f6ba (patch)
tree0c39797390fe05a1786eda945e64af342e7ee0f7
parentb61ca65563a1de28f17c0ffcf14b2f6dd9960505 (diff)
downloadchromium_src-45a3f1d3cca7961e7ca1d59b67a8f687b148f6ba.zip
chromium_src-45a3f1d3cca7961e7ca1d59b67a8f687b148f6ba.tar.gz
chromium_src-45a3f1d3cca7961e7ca1d59b67a8f687b148f6ba.tar.bz2
Merge 138283 - 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 TBR=groby@chromium.org Review URL: https://chromiumcodereview.appspot.com/10409082 git-svn-id: svn://svn.chromium.org/chrome/branches/1132/src@138373 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/cocoa/web_intent_picker_cocoa.h2
-rw-r--r--chrome/browser/ui/cocoa/web_intent_sheet_controller.mm4
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 e4e25f3..cc668e5 100644
--- a/chrome/browser/ui/cocoa/web_intent_sheet_controller.mm
+++ b/chrome/browser/ui/cocoa/web_intent_sheet_controller.mm
@@ -417,8 +417,10 @@ const CGFloat kTextWidth = kWindowWidth -
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;