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

Unified Diff: ui/wayland/wayland_message_pump.cc

Issue 10009024: Remove WAYLAND port (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/wayland/wayland_message_pump.h ('k') | ui/wayland/wayland_screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wayland/wayland_message_pump.cc
diff --git a/ui/wayland/wayland_message_pump.cc b/ui/wayland/wayland_message_pump.cc
deleted file mode 100644
index 9e7e671798b7d4c785c889d861476891d918c698..0000000000000000000000000000000000000000
--- a/ui/wayland/wayland_message_pump.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/wayland/wayland_message_pump.h"
-
-#include <wayland-client.h>
-
-#include "ui/wayland/wayland_display.h"
-
-namespace ui {
-
-WaylandMessagePump::WaylandMessagePump(WaylandDisplay* display)
- : display_(display) {
- static GSourceFuncs kSourceHandlers = {
- WaylandMessagePump::SourcePrepare,
- WaylandMessagePump::SourceCheck,
- WaylandMessagePump::SourceDispatch,
- NULL
- };
-
- source_ = static_cast<WorkSource*>(
- g_source_new(&kSourceHandlers, sizeof(WorkSource)));
- source_->pump = this;
- pfd_.fd = wl_display_get_fd(display_->display(),
- WaylandMessagePump::SourceUpdate,
- source_);
- pfd_.events = G_IO_IN | G_IO_ERR;
- g_source_add_poll(source_, &pfd_);
- g_source_attach(source_, NULL);
-}
-
-WaylandMessagePump::~WaylandMessagePump() {
- g_source_destroy(source_);
- g_source_unref(source_);
-}
-
-int WaylandMessagePump::HandlePrepare() {
- while (mask_ & WL_DISPLAY_WRITABLE)
- wl_display_iterate(display_->display(), WL_DISPLAY_WRITABLE);
-
- return -1;
-}
-
-bool WaylandMessagePump::HandleCheck() {
- return pfd_.revents;
-}
-
-void WaylandMessagePump::HandleDispatch() {
- wl_display_iterate(display_->display(), WL_DISPLAY_READABLE);
-}
-
-// static
-gboolean WaylandMessagePump::SourcePrepare(GSource* source, gint* timeout) {
- *timeout = static_cast<WorkSource*>(source)->pump->HandlePrepare();
- return FALSE;
-}
-
-// static
-gboolean WaylandMessagePump::SourceCheck(GSource* source) {
- return static_cast<WorkSource*>(source)->pump->HandleCheck();
-}
-
-// static
-gboolean WaylandMessagePump::SourceDispatch(GSource* source,
- GSourceFunc callback,
- gpointer data) {
- static_cast<WorkSource*>(source)->pump->HandleDispatch();
- return TRUE;
-}
-
-// static
-int WaylandMessagePump::SourceUpdate(uint32_t mask, void* data) {
- static_cast<WorkSource*>(data)->pump->mask_ = mask;
- return 0;
-}
-
-} // namespace ui
« no previous file with comments | « ui/wayland/wayland_message_pump.h ('k') | ui/wayland/wayland_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698