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

Side by Side Diff: media/tools/player_x11/player_x11.cc

Issue 8879032: Removing MessageLoop::QuitTask() from media/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fixed. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <iostream> 5 #include <iostream>
6 #include <signal.h> 6 #include <signal.h>
7 #include <X11/keysym.h> 7 #include <X11/keysym.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 19 matching lines...) Expand all
30 #include "media/tools/player_x11/x11_video_renderer.h" 30 #include "media/tools/player_x11/x11_video_renderer.h"
31 31
32 static Display* g_display = NULL; 32 static Display* g_display = NULL;
33 static Window g_window = 0; 33 static Window g_window = 0;
34 static bool g_running = false; 34 static bool g_running = false;
35 35
36 class MessageLoopQuitter { 36 class MessageLoopQuitter {
37 public: 37 public:
38 explicit MessageLoopQuitter(MessageLoop* loop) : loop_(loop) {} 38 explicit MessageLoopQuitter(MessageLoop* loop) : loop_(loop) {}
39 void Quit(media::PipelineStatus status) { 39 void Quit(media::PipelineStatus status) {
40 loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 40 loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
41 delete this; 41 delete this;
42 } 42 }
43 private: 43 private:
44 MessageLoop* loop_; 44 MessageLoop* loop_;
45 DISALLOW_COPY_AND_ASSIGN(MessageLoopQuitter); 45 DISALLOW_COPY_AND_ASSIGN(MessageLoopQuitter);
46 }; 46 };
47 47
48 // Initialize X11. Returns true if successful. This method creates the X11 48 // Initialize X11. Returns true if successful. This method creates the X11
49 // window. Further initialization is done in X11VideoRenderer. 49 // window. Further initialization is done in X11VideoRenderer.
50 bool InitX11() { 50 bool InitX11() {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 // Cleanup tasks. 259 // Cleanup tasks.
260 message_loop_factory.reset(); 260 message_loop_factory.reset();
261 261
262 thread->Stop(); 262 thread->Stop();
263 XDestroyWindow(g_display, g_window); 263 XDestroyWindow(g_display, g_window);
264 XCloseDisplay(g_display); 264 XCloseDisplay(g_display);
265 return 0; 265 return 0;
266 } 266 }
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_output_win_unittest.cc ('k') | media/video/capture/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698