diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 21:49:05 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 21:49:05 +0000 |
commit | 1d8e4ce0743eed37a143d99e568c28abbe3202f1 (patch) | |
tree | ce8c850b2fa6d8a87f419255c368817c02f23a4f /base/message_pump_mac.mm | |
parent | f59a9c06d5cc9b7e0faace2b76582d3a12c3ec6c (diff) | |
download | chromium_src-1d8e4ce0743eed37a143d99e568c28abbe3202f1.zip chromium_src-1d8e4ce0743eed37a143d99e568c28abbe3202f1.tar.gz chromium_src-1d8e4ce0743eed37a143d99e568c28abbe3202f1.tar.bz2 |
Implement temporary First Run Dialog on OS X
We use a modal dialog with a single checkbox on OS X.
We use the OSX defaults system since we want something quick and reliable. The
dialog is displayed at a very early stage in Chrome startup (Before any
subsystems start relying on the stats variable). This means there are a few
quirks in displaying the UI.
A change was also needed to our event handling code since when the dialog is
shown we spin an event loop at a very early stage in the process lifetime.
Changed default value for stats to false and updated unit tests to reflect that.
Also some misc. minor cleanup.
BUG=11971,12046
Review URL: http://codereview.chromium.org/115608
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_mac.mm')
-rw-r--r-- | base/message_pump_mac.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/base/message_pump_mac.mm b/base/message_pump_mac.mm index 3328bc9..b030a16 100644 --- a/base/message_pump_mac.mm +++ b/base/message_pump_mac.mm @@ -190,7 +190,12 @@ void MessagePumpCFRunLoopBase::RunIdleWork(CFRunLoopObserverRef observer, // autoreleased objects to ensure they go away sooner. ScopedNSAutoreleasePool autorelease_pool; - if (self->delegate_->DoIdleWork()) { + // The "self->delegate_ &&" part of the clause is needed for the case of + // the temporary modal first run dialog. The dialog is displayed really + // early in the Chrome launch process at which time self->delegate_ is null. + // TODO: remove the "self->delegate_ &&" clause from the bellow condition once + // we remove the modal first run dialog. + if (self->delegate_ && self->delegate_->DoIdleWork()) { // If idle work was done, don't let the loop go to sleep. More idle work // might be waiting. CFRunLoopWakeUp(self->run_loop_); |