| 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 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 friend class MessagePumpX11; | 420 friend class MessagePumpX11; |
| 421 MessagePumpX11* pump_gpu() { | 421 MessagePumpX11* pump_gpu() { |
| 422 DCHECK_EQ(TYPE_GPU, type()); | 422 DCHECK_EQ(TYPE_GPU, type()); |
| 423 return static_cast<MessagePumpX11*>(pump_.get()); | 423 return static_cast<MessagePumpX11*>(pump_.get()); |
| 424 } | 424 } |
| 425 #endif | 425 #endif |
| 426 #endif | 426 #endif |
| 427 | 427 |
| 428 scoped_ptr<MessagePump> pump_; | 428 scoped_ptr<MessagePump> pump_; |
| 429 | 429 |
| 430 protected: |
| 431 virtual void ReloadAllWorkQueues(); |
| 432 virtual TaskQueue& GetNextWorkQueue(); |
| 433 virtual bool HasWorkAvailable() const; |
| 434 |
| 430 private: | 435 private: |
| 431 friend class internal::IncomingTaskQueue; | 436 friend class internal::IncomingTaskQueue; |
| 432 friend class RunLoop; | 437 friend class RunLoop; |
| 433 | 438 |
| 434 // Configures various members for the two constructors. | 439 // Configures various members for the two constructors. |
| 435 void Init(); | 440 void Init(); |
| 436 | 441 |
| 437 // Invokes the actual run loop using the message pump. | 442 // Invokes the actual run loop using the message pump. |
| 438 void RunHandler(); | 443 void RunHandler(); |
| 439 | 444 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 717 |
| 713 // Do not add any member variables to MessageLoopForIO! This is important b/c | 718 // Do not add any member variables to MessageLoopForIO! This is important b/c |
| 714 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra | 719 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra |
| 715 // data that you need should be stored on the MessageLoop's pump_ instance. | 720 // data that you need should be stored on the MessageLoop's pump_ instance. |
| 716 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), | 721 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), |
| 717 MessageLoopForIO_should_not_have_extra_member_variables); | 722 MessageLoopForIO_should_not_have_extra_member_variables); |
| 718 | 723 |
| 719 } // namespace base | 724 } // namespace base |
| 720 | 725 |
| 721 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ | 726 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_H_ |
| OLD | NEW |