OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef BASE_MESSAGE_LOOP_H_ | 5 #ifndef BASE_MESSAGE_LOOP_H_ |
6 #define BASE_MESSAGE_LOOP_H_ | 6 #define BASE_MESSAGE_LOOP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 338 |
339 // Used to record that Quit() was called, or that we should quit the pump | 339 // Used to record that Quit() was called, or that we should quit the pump |
340 // once it becomes idle. | 340 // once it becomes idle. |
341 bool quit_received; | 341 bool quit_received; |
342 | 342 |
343 #if !defined(OS_MACOSX) | 343 #if !defined(OS_MACOSX) |
344 Dispatcher* dispatcher; | 344 Dispatcher* dispatcher; |
345 #endif | 345 #endif |
346 }; | 346 }; |
347 | 347 |
348 class AutoRunState : RunState { | 348 class BASE_API AutoRunState : RunState { |
349 public: | 349 public: |
350 explicit AutoRunState(MessageLoop* loop); | 350 explicit AutoRunState(MessageLoop* loop); |
351 ~AutoRunState(); | 351 ~AutoRunState(); |
352 private: | 352 private: |
353 MessageLoop* loop_; | 353 MessageLoop* loop_; |
354 RunState* previous_state_; | 354 RunState* previous_state_; |
355 }; | 355 }; |
356 | 356 |
357 // This structure is copied around by value. | 357 // This structure is copied around by value. |
358 struct PendingTask { | 358 struct PendingTask { |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 #endif // defined(OS_POSIX) | 628 #endif // defined(OS_POSIX) |
629 }; | 629 }; |
630 | 630 |
631 // Do not add any member variables to MessageLoopForIO! This is important b/c | 631 // Do not add any member variables to MessageLoopForIO! This is important b/c |
632 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 632 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
633 // data that you need should be stored on the MessageLoop's pump_ instance. | 633 // data that you need should be stored on the MessageLoop's pump_ instance. |
634 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 634 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
635 MessageLoopForIO_should_not_have_extra_member_variables); | 635 MessageLoopForIO_should_not_have_extra_member_variables); |
636 | 636 |
637 #endif // BASE_MESSAGE_LOOP_H_ | 637 #endif // BASE_MESSAGE_LOOP_H_ |
OLD | NEW |