summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-25 18:43:23 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-25 18:43:23 +0000
commit242c4bd36b82138f6ab7b2dea12b7d31830b0560 (patch)
treebce48fcc49b67b5a32581e08a5994611010aa680
parent7310050cab8c59a0b834538786096e9a542568c2 (diff)
downloadchromium_src-242c4bd36b82138f6ab7b2dea12b7d31830b0560.zip
chromium_src-242c4bd36b82138f6ab7b2dea12b7d31830b0560.tar.gz
chromium_src-242c4bd36b82138f6ab7b2dea12b7d31830b0560.tar.bz2
Fix style mistakes in r75477.
Associated review at: http://codereview.chromium.org/6489031/ BUG=none TEST=none Review URL: http://codereview.chromium.org/6532102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76074 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/message_loop.cc7
-rw-r--r--base/message_loop.h20
-rw-r--r--remoting/host/event_executor_linux.cc2
3 files changed, 18 insertions, 11 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 453172b..85e37d4 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -669,12 +669,11 @@ void MessageLoopForUI::DidProcessMessage(const MSG& message) {
}
#endif // defined(OS_WIN)
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
-Display* MessageLoopForUI::get_display()
-{
+#if defined(USE_X11)
+Display* MessageLoopForUI::GetDisplay() {
return gdk_x11_get_default_xdisplay();
}
-#endif
+#endif // defined(USE_X11)
#if !defined(OS_MACOSX) && !defined(OS_NACL)
void MessageLoopForUI::AddObserver(Observer* observer) {
diff --git a/base/message_loop.h b/base/message_loop.h
index 58306a7..c1dce43 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -465,9 +465,9 @@ class MessageLoop : public base::MessagePump::Delegate {
scoped_refptr<base::Histogram> message_histogram_;
// A null terminated list which creates an incoming_queue of tasks that are
- // acquired under a mutex for processing on this instance's thread. These tasks
- // have not yet been sorted out into items for our work_queue_ vs items that
- // will be handled by the TimerManager.
+ // acquired under a mutex for processing on this instance's thread. These
+ // tasks have not yet been sorted out into items for our work_queue_ vs
+ // items that will be handled by the TimerManager.
TaskQueue incoming_queue_;
// Protect access to incoming_queue_.
mutable base::Lock incoming_queue_lock_;
@@ -509,9 +509,17 @@ class MessageLoopForUI : public MessageLoop {
void DidProcessMessage(const MSG& message);
#endif // defined(OS_WIN)
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
- Display* get_display();
-#endif
+#if defined(USE_X11)
+ // Returns the Xlib Display that backs the MessagePump for this MessageLoop.
+ //
+ // This allows for raw access to the X11 server in situations where our
+ // abstractions do not provide enough power.
+ //
+ // Be careful how this is used. The MessagePump in general expects
+ // exclusive access to the Display. Calling things like XNextEvent() will
+ // likely break things in subtle, hard to detect, ways.
+ Display* GetDisplay();
+#endif // defined(OS_X11)
#if !defined(OS_MACOSX)
// Please see message_pump_win/message_pump_glib for definitions of these
diff --git a/remoting/host/event_executor_linux.cc b/remoting/host/event_executor_linux.cc
index 1e82fc9..200e4e4 100644
--- a/remoting/host/event_executor_linux.cc
+++ b/remoting/host/event_executor_linux.cc
@@ -354,7 +354,7 @@ EventExecutorLinux::EventExecutorLinux(
MessageLoopForUI* message_loop, Capturer* capturer)
: message_loop_(message_loop),
capturer_(capturer),
- pimpl_(new EventExecutorLinuxPimpl(this, message_loop->get_display())) {
+ pimpl_(new EventExecutorLinuxPimpl(this, message_loop->GetDisplay())) {
CHECK(pimpl_->Init());
}