OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 LPTOP_LEVEL_EXCEPTION_FILTER top_filter = NULL; | 61 LPTOP_LEVEL_EXCEPTION_FILTER top_filter = NULL; |
62 top_filter = ::SetUnhandledExceptionFilter(0); | 62 top_filter = ::SetUnhandledExceptionFilter(0); |
63 ::SetUnhandledExceptionFilter(top_filter); | 63 ::SetUnhandledExceptionFilter(top_filter); |
64 return top_filter; | 64 return top_filter; |
65 } | 65 } |
66 | 66 |
67 #endif // defined(OS_WIN) | 67 #endif // defined(OS_WIN) |
68 | 68 |
69 //------------------------------------------------------------------------------ | 69 //------------------------------------------------------------------------------ |
70 | 70 |
| 71 MessageLoop::TaskObserver::TaskObserver() { |
| 72 } |
| 73 |
| 74 MessageLoop::TaskObserver::~TaskObserver() { |
| 75 } |
| 76 |
| 77 MessageLoop::DestructionObserver::~DestructionObserver() { |
| 78 } |
| 79 |
| 80 //------------------------------------------------------------------------------ |
| 81 |
71 // static | 82 // static |
72 MessageLoop* MessageLoop::current() { | 83 MessageLoop* MessageLoop::current() { |
73 // TODO(darin): sadly, we cannot enable this yet since people call us even | 84 // TODO(darin): sadly, we cannot enable this yet since people call us even |
74 // when they have no intention of using us. | 85 // when they have no intention of using us. |
75 // DCHECK(loop) << "Ouch, did you forget to initialize me?"; | 86 // DCHECK(loop) << "Ouch, did you forget to initialize me?"; |
76 return lazy_tls_ptr.Pointer()->Get(); | 87 return lazy_tls_ptr.Pointer()->Get(); |
77 } | 88 } |
78 | 89 |
79 MessageLoop::MessageLoop(Type type) | 90 MessageLoop::MessageLoop(Type type) |
80 : type_(type), | 91 : type_(type), |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 Watcher *delegate) { | 677 Watcher *delegate) { |
667 return pump_libevent()->WatchFileDescriptor( | 678 return pump_libevent()->WatchFileDescriptor( |
668 fd, | 679 fd, |
669 persistent, | 680 persistent, |
670 static_cast<base::MessagePumpLibevent::Mode>(mode), | 681 static_cast<base::MessagePumpLibevent::Mode>(mode), |
671 controller, | 682 controller, |
672 delegate); | 683 delegate); |
673 } | 684 } |
674 | 685 |
675 #endif | 686 #endif |
OLD | NEW |