Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: base/message_loop/message_pump_mac.mm

Issue 15709015: Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Wind… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/message_loop/message_pump_mac.h ('k') | base/message_loop/message_pump_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "base/message_loop/message_pump_mac.h" 5 #import "base/message_loop/message_pump_mac.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 // Must be called on the run loop thread. 202 // Must be called on the run loop thread.
203 void MessagePumpCFRunLoopBase::ScheduleDelayedWork( 203 void MessagePumpCFRunLoopBase::ScheduleDelayedWork(
204 const TimeTicks& delayed_work_time) { 204 const TimeTicks& delayed_work_time) {
205 TimeDelta delta = delayed_work_time - TimeTicks::Now(); 205 TimeDelta delta = delayed_work_time - TimeTicks::Now();
206 delayed_work_fire_time_ = CFAbsoluteTimeGetCurrent() + delta.InSecondsF(); 206 delayed_work_fire_time_ = CFAbsoluteTimeGetCurrent() + delta.InSecondsF();
207 CFRunLoopTimerSetNextFireDate(delayed_work_timer_, delayed_work_fire_time_); 207 CFRunLoopTimerSetNextFireDate(delayed_work_timer_, delayed_work_fire_time_);
208 } 208 }
209 209
210 void MessagePumpCFRunLoopBase::Shutdown() {
211 }
212
210 // Called from the run loop. 213 // Called from the run loop.
211 // static 214 // static
212 void MessagePumpCFRunLoopBase::RunDelayedWorkTimer(CFRunLoopTimerRef timer, 215 void MessagePumpCFRunLoopBase::RunDelayedWorkTimer(CFRunLoopTimerRef timer,
213 void* info) { 216 void* info) {
214 MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); 217 MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info);
215 218
216 // The timer won't fire again until it's reset. 219 // The timer won't fire again until it's reset.
217 self->delayed_work_fire_time_ = kCFTimeIntervalMax; 220 self->delayed_work_fire_time_ = kCFTimeIntervalMax;
218 221
219 // CFRunLoopTimers fire outside of the priority scheme for CFRunLoopSources. 222 // CFRunLoopTimers fire outside of the priority scheme for CFRunLoopSources.
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 [NSApplication sharedApplication]; 695 [NSApplication sharedApplication];
693 g_not_using_cr_app = true; 696 g_not_using_cr_app = true;
694 return new MessagePumpNSApplication; 697 return new MessagePumpNSApplication;
695 #endif 698 #endif
696 } 699 }
697 700
698 return new MessagePumpNSRunLoop; 701 return new MessagePumpNSRunLoop;
699 } 702 }
700 703
701 } // namespace base 704 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_mac.h ('k') | base/message_loop/message_pump_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698