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

Side by Side Diff: jingle/glue/task_pump.h

Issue 450463002: Update webrtc&libjingle 6774:6825. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 4 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
« no previous file with comments | « jingle/glue/mock_task.cc ('k') | jingle/glue/task_pump_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef JINGLE_GLUE_TASK_PUMP_H_ 5 #ifndef JINGLE_GLUE_TASK_PUMP_H_
6 #define JINGLE_GLUE_TASK_PUMP_H_ 6 #define JINGLE_GLUE_TASK_PUMP_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
11 #include "third_party/libjingle/source/talk/base/taskrunner.h" 11 #include "third_party/webrtc/base/taskrunner.h"
12 12
13 namespace jingle_glue { 13 namespace jingle_glue {
14 14
15 // talk_base::TaskRunner implementation that works on chromium threads. 15 // rtc::TaskRunner implementation that works on chromium threads.
16 class TaskPump : public talk_base::TaskRunner, public base::NonThreadSafe { 16 class TaskPump : public rtc::TaskRunner, public base::NonThreadSafe {
17 public: 17 public:
18 TaskPump(); 18 TaskPump();
19 19
20 virtual ~TaskPump(); 20 virtual ~TaskPump();
21 21
22 // talk_base::TaskRunner implementation. 22 // rtc::TaskRunner implementation.
23 virtual void WakeTasks() OVERRIDE; 23 virtual void WakeTasks() OVERRIDE;
24 virtual int64 CurrentTime() OVERRIDE; 24 virtual int64 CurrentTime() OVERRIDE;
25 25
26 // No tasks will be processed after this is called, even if 26 // No tasks will be processed after this is called, even if
27 // WakeTasks() is called. 27 // WakeTasks() is called.
28 void Stop(); 28 void Stop();
29 29
30 private: 30 private:
31 void CheckAndRunTasks(); 31 void CheckAndRunTasks();
32 32
33 bool posted_wake_; 33 bool posted_wake_;
34 bool stopped_; 34 bool stopped_;
35 35
36 base::WeakPtrFactory<TaskPump> weak_factory_; 36 base::WeakPtrFactory<TaskPump> weak_factory_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(TaskPump); 38 DISALLOW_COPY_AND_ASSIGN(TaskPump);
39 }; 39 };
40 40
41 } // namespace jingle_glue 41 } // namespace jingle_glue
42 42
43 #endif // JINGLE_GLUE_TASK_PUMP_H_ 43 #endif // JINGLE_GLUE_TASK_PUMP_H_
OLDNEW
« no previous file with comments | « jingle/glue/mock_task.cc ('k') | jingle/glue/task_pump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698