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

Side by Side Diff: remoting/jingle_glue/jingle_thread.h

Issue 9582031: Don't crash in ~HostNPScriptObject() when the object wasn't initialized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 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 | « remoting/host/plugin/host_script_object.cc ('k') | remoting/jingle_glue/jingle_thread.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) 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 #ifndef REMOTING_JINGLE_GLUE_JINGLE_THREAD_H_ 5 #ifndef REMOTING_JINGLE_GLUE_JINGLE_THREAD_H_
6 #define REMOTING_JINGLE_GLUE_JINGLE_THREAD_H_ 6 #define REMOTING_JINGLE_GLUE_JINGLE_THREAD_H_
7 7
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/tracked_objects.h" 9 #include "base/tracked_objects.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 29 matching lines...) Expand all
40 DISALLOW_COPY_AND_ASSIGN(JingleThreadMessageLoop); 40 DISALLOW_COPY_AND_ASSIGN(JingleThreadMessageLoop);
41 }; 41 };
42 42
43 // TODO(sergeyu): This class should be changed to inherit from Chromiums 43 // TODO(sergeyu): This class should be changed to inherit from Chromiums
44 // base::Thread instead of libjingle's thread. 44 // base::Thread instead of libjingle's thread.
45 class JingleThread : public talk_base::Thread { 45 class JingleThread : public talk_base::Thread {
46 public: 46 public:
47 JingleThread(); 47 JingleThread();
48 virtual ~JingleThread(); 48 virtual ~JingleThread();
49 49
50 void Start(); 50 bool Start();
51 51
52 // Main function for the thread. Should not be called directly. 52 // Main function for the thread. Should not be called directly.
53 virtual void Run() OVERRIDE; 53 virtual void Run() OVERRIDE;
54 54
55 // Stop the thread. 55 // Stop the thread.
56 virtual void Stop() OVERRIDE; 56 virtual void Stop() OVERRIDE;
57 57
58 // Returns Chromiums message loop for this thread. 58 // Returns Chromiums message loop for this thread.
59 MessageLoop* message_loop(); 59 MessageLoop* message_loop();
60 base::MessageLoopProxy* message_loop_proxy(); 60 base::MessageLoopProxy* message_loop_proxy();
61 61
62 // Returns task pump if the thread is running, otherwise NULL is returned. 62 // Returns task pump if the thread is running, otherwise NULL is returned.
63 TaskPump* task_pump(); 63 TaskPump* task_pump();
64 64
65 private: 65 private:
66 TaskPump* task_pump_; 66 TaskPump* task_pump_;
67 base::WaitableEvent started_event_; 67 base::WaitableEvent started_event_;
68 base::WaitableEvent stopped_event_; 68 base::WaitableEvent stopped_event_;
69 MessageLoop* message_loop_; 69 MessageLoop* message_loop_;
70 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 70 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(JingleThread); 72 DISALLOW_COPY_AND_ASSIGN(JingleThread);
73 }; 73 };
74 74
75 } // namespace remoting 75 } // namespace remoting
76 76
77 #endif // REMOTING_JINGLE_GLUE_JINGLE_THREAD_H_ 77 #endif // REMOTING_JINGLE_GLUE_JINGLE_THREAD_H_
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/jingle_glue/jingle_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698