Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: base/message_loop.cc

Issue 6489031: Run event executor on the ui thread to remove the need to explicitly XFlush() the XTest calls. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unused gtk dependency. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #if defined(OS_POSIX) && !defined(OS_MACOSX)
8 #include <gdk/gdk.h>
9 #include <gdk/gdkx.h>
10 #endif
11
7 #include <algorithm> 12 #include <algorithm>
8 13
9 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
10 #include "base/lazy_instance.h" 15 #include "base/lazy_instance.h"
11 #include "base/logging.h" 16 #include "base/logging.h"
12 #include "base/message_pump_default.h" 17 #include "base/message_pump_default.h"
13 #include "base/metrics/histogram.h" 18 #include "base/metrics/histogram.h"
14 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 19 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
15 #include "base/threading/thread_local.h" 20 #include "base/threading/thread_local.h"
16 21
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 662
658 //------------------------------------------------------------------------------ 663 //------------------------------------------------------------------------------
659 // MessageLoopForUI 664 // MessageLoopForUI
660 665
661 #if defined(OS_WIN) 666 #if defined(OS_WIN)
662 void MessageLoopForUI::DidProcessMessage(const MSG& message) { 667 void MessageLoopForUI::DidProcessMessage(const MSG& message) {
663 pump_win()->DidProcessMessage(message); 668 pump_win()->DidProcessMessage(message);
664 } 669 }
665 #endif // defined(OS_WIN) 670 #endif // defined(OS_WIN)
666 671
672 #if defined(OS_POSIX) && !defined(OS_MACOSX)
673 Display* MessageLoopForUI::get_display()
674 {
675 return gdk_x11_get_default_xdisplay();
676 }
677 #endif
678
667 #if !defined(OS_MACOSX) && !defined(OS_NACL) 679 #if !defined(OS_MACOSX) && !defined(OS_NACL)
668 void MessageLoopForUI::AddObserver(Observer* observer) { 680 void MessageLoopForUI::AddObserver(Observer* observer) {
669 pump_ui()->AddObserver(observer); 681 pump_ui()->AddObserver(observer);
670 } 682 }
671 683
672 void MessageLoopForUI::RemoveObserver(Observer* observer) { 684 void MessageLoopForUI::RemoveObserver(Observer* observer) {
673 pump_ui()->RemoveObserver(observer); 685 pump_ui()->RemoveObserver(observer);
674 } 686 }
675 687
676 void MessageLoopForUI::Run(Dispatcher* dispatcher) { 688 void MessageLoopForUI::Run(Dispatcher* dispatcher) {
(...skipping 25 matching lines...) Expand all
702 Watcher *delegate) { 714 Watcher *delegate) {
703 return pump_libevent()->WatchFileDescriptor( 715 return pump_libevent()->WatchFileDescriptor(
704 fd, 716 fd,
705 persistent, 717 persistent,
706 static_cast<base::MessagePumpLibevent::Mode>(mode), 718 static_cast<base::MessagePumpLibevent::Mode>(mode),
707 controller, 719 controller,
708 delegate); 720 delegate);
709 } 721 }
710 722
711 #endif 723 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698