OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 pump_win()->RemoveObserver(observer); | 566 pump_win()->RemoveObserver(observer); |
567 } | 567 } |
568 | 568 |
569 void MessageLoopForUI::WillProcessMessage(const MSG& message) { | 569 void MessageLoopForUI::WillProcessMessage(const MSG& message) { |
570 pump_win()->WillProcessMessage(message); | 570 pump_win()->WillProcessMessage(message); |
571 } | 571 } |
572 void MessageLoopForUI::DidProcessMessage(const MSG& message) { | 572 void MessageLoopForUI::DidProcessMessage(const MSG& message) { |
573 pump_win()->DidProcessMessage(message); | 573 pump_win()->DidProcessMessage(message); |
574 } | 574 } |
575 void MessageLoopForUI::PumpOutPendingPaintMessages() { | 575 void MessageLoopForUI::PumpOutPendingPaintMessages() { |
576 pump_win()->PumpOutPendingPaintMessages(); | 576 pump_ui()->PumpOutPendingPaintMessages(); |
577 } | 577 } |
578 | 578 |
579 #endif // defined(OS_WIN) | 579 #endif // defined(OS_WIN) |
580 | 580 |
581 //------------------------------------------------------------------------------ | 581 //------------------------------------------------------------------------------ |
582 // MessageLoopForIO | 582 // MessageLoopForIO |
583 | 583 |
584 #if defined(OS_WIN) | 584 #if defined(OS_WIN) |
585 | 585 |
586 void MessageLoopForIO::WatchObject(HANDLE object, Watcher* watcher) { | |
587 pump_io()->WatchObject(object, watcher); | |
588 } | |
589 | |
590 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { | 586 void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) { |
591 pump_io()->RegisterIOHandler(file, handler); | 587 pump_io()->RegisterIOHandler(file, handler); |
592 } | 588 } |
593 | 589 |
594 void MessageLoopForIO::RegisterIOContext(OVERLAPPED* context, | 590 bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { |
595 IOHandler* handler) { | 591 return pump_io()->WaitForIOCompletion(timeout, filter); |
596 pump_io()->RegisterIOContext(context, handler); | |
597 } | 592 } |
598 | 593 |
599 #elif defined(OS_POSIX) | 594 #elif defined(OS_POSIX) |
600 | 595 |
601 void MessageLoopForIO::WatchSocket(int socket, short interest_mask, | 596 void MessageLoopForIO::WatchSocket(int socket, short interest_mask, |
602 struct event* e, Watcher* watcher) { | 597 struct event* e, Watcher* watcher) { |
603 pump_libevent()->WatchSocket(socket, interest_mask, e, watcher); | 598 pump_libevent()->WatchSocket(socket, interest_mask, e, watcher); |
604 } | 599 } |
605 | 600 |
606 void MessageLoopForIO::UnwatchSocket(struct event* e) { | 601 void MessageLoopForIO::UnwatchSocket(struct event* e) { |
607 pump_libevent()->UnwatchSocket(e); | 602 pump_libevent()->UnwatchSocket(e); |
608 } | 603 } |
609 #endif | 604 #endif |
OLD | NEW |