OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "base/win/scoped_handle.h" | 29 #include "base/win/scoped_handle.h" |
30 #endif | 30 #endif |
31 | 31 |
32 namespace base { | 32 namespace base { |
33 | 33 |
34 // TODO(darin): Platform-specific MessageLoop tests should be grouped together | 34 // TODO(darin): Platform-specific MessageLoop tests should be grouped together |
35 // to avoid chopping this file up with so many #ifdefs. | 35 // to avoid chopping this file up with so many #ifdefs. |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 MessagePump* TypeDefaultMessagePumpFactory() { | 39 scoped_ptr<MessagePump> TypeDefaultMessagePumpFactory() { |
40 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_DEFAULT); | 40 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_DEFAULT); |
41 } | 41 } |
42 | 42 |
43 MessagePump* TypeIOMessagePumpFactory() { | 43 scoped_ptr<MessagePump> TypeIOMessagePumpFactory() { |
44 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_IO); | 44 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_IO); |
45 } | 45 } |
46 | 46 |
47 MessagePump* TypeUIMessagePumpFactory() { | 47 scoped_ptr<MessagePump> TypeUIMessagePumpFactory() { |
48 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_UI); | 48 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_UI); |
49 } | 49 } |
50 | 50 |
51 class Foo : public RefCounted<Foo> { | 51 class Foo : public RefCounted<Foo> { |
52 public: | 52 public: |
53 Foo() : test_count_(0) { | 53 Foo() : test_count_(0) { |
54 } | 54 } |
55 | 55 |
56 void Test0() { | 56 void Test0() { |
57 ++test_count_; | 57 ++test_count_; |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 | 1040 |
1041 ASSERT_TRUE(PostMessage(message_hwnd, kSignalMsg, 0, 1)); | 1041 ASSERT_TRUE(PostMessage(message_hwnd, kSignalMsg, 0, 1)); |
1042 | 1042 |
1043 loop.Run(); | 1043 loop.Run(); |
1044 | 1044 |
1045 ASSERT_TRUE(UnregisterClass(MAKEINTATOM(atom), instance)); | 1045 ASSERT_TRUE(UnregisterClass(MAKEINTATOM(atom), instance)); |
1046 } | 1046 } |
1047 #endif // defined(OS_WIN) | 1047 #endif // defined(OS_WIN) |
1048 | 1048 |
1049 } // namespace base | 1049 } // namespace base |
OLD | NEW |