OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 19 matching lines...) Expand all Loading... |
30 */ | 30 */ |
31 | 31 |
32 // ThreadedStreamProcessor forwards data from one thread to | 32 // ThreadedStreamProcessor forwards data from one thread to |
33 // another processor that will run on a new thread owned by the | 33 // another processor that will run on a new thread owned by the |
34 // ThreadedStreamProcessor. | 34 // ThreadedStreamProcessor. |
35 | 35 |
36 #ifndef O3D_IMPORT_CROSS_THREADED_STREAM_PROCESSOR_H_ | 36 #ifndef O3D_IMPORT_CROSS_THREADED_STREAM_PROCESSOR_H_ |
37 #define O3D_IMPORT_CROSS_THREADED_STREAM_PROCESSOR_H_ | 37 #define O3D_IMPORT_CROSS_THREADED_STREAM_PROCESSOR_H_ |
38 | 38 |
39 #include "base/basictypes.h" | 39 #include "base/basictypes.h" |
40 #include "base/thread.h" | 40 #include "base/threading/thread.h" |
41 #include "import/cross/memory_stream.h" | 41 #include "import/cross/memory_stream.h" |
42 | 42 |
43 namespace o3d { | 43 namespace o3d { |
44 | 44 |
45 class ThreadedStreamProcessor : public StreamProcessor { | 45 class ThreadedStreamProcessor : public StreamProcessor { |
46 public: | 46 public: |
47 explicit ThreadedStreamProcessor(StreamProcessor *receiver); | 47 explicit ThreadedStreamProcessor(StreamProcessor *receiver); |
48 virtual ~ThreadedStreamProcessor(); | 48 virtual ~ThreadedStreamProcessor(); |
49 | 49 |
50 virtual Status ProcessBytes(MemoryReadStream *stream, | 50 virtual Status ProcessBytes(MemoryReadStream *stream, |
(...skipping 12 matching lines...) Expand all Loading... |
63 | 63 |
64 StreamProcessor* receiver_; | 64 StreamProcessor* receiver_; |
65 ::base::Thread thread_; | 65 ::base::Thread thread_; |
66 Status status_; | 66 Status status_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(ThreadedStreamProcessor); | 68 DISALLOW_COPY_AND_ASSIGN(ThreadedStreamProcessor); |
69 }; | 69 }; |
70 } // namespace o3d | 70 } // namespace o3d |
71 | 71 |
72 #endif // O3D_IMPORT_CROSS_THREADED_STREAM_PROCESSOR_H_ | 72 #endif // O3D_IMPORT_CROSS_THREADED_STREAM_PROCESSOR_H_ |
OLD | NEW |