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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.h

Issue 10800084: Remove non-streaming translation code from pnacl coordinator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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 NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_STREAMING_TRANSLATE_THREAD_H_ 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_STREAMING_TRANSLATE_THREAD_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_STREAMING_TRANSLATE_THREAD_H_ 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_STREAMING_TRANSLATE_THREAD_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
11 #include "native_client/src/include/nacl_macros.h" 11 #include "native_client/src/include/nacl_macros.h"
12 #include "native_client/src/shared/platform/nacl_sync_checked.h" 12 #include "native_client/src/shared/platform/nacl_sync_checked.h"
13 #include "native_client/src/trusted/plugin/pnacl_translate_thread.h" 13 #include "native_client/src/trusted/plugin/pnacl_translate_thread.h"
14 14
15 namespace plugin { 15 namespace plugin {
16 16
17 class PnaclStreamingTranslateThread : public PnaclTranslateThread { 17 class PnaclStreamingTranslateThread : public PnaclTranslateThread {
18 public: 18 public:
19 PnaclStreamingTranslateThread(); 19 PnaclStreamingTranslateThread();
20 virtual ~PnaclStreamingTranslateThread(); 20 virtual ~PnaclStreamingTranslateThread();
21 21
22 // Start the translation process. It will continue to run and consume data 22 // Start the translation process. It will continue to run and consume data
23 // as it is passed in with PutBytes. 23 // as it is passed in with PutBytes.
24 virtual void RunTranslate(const pp::CompletionCallback& finish_callback, 24 virtual void RunTranslate(const pp::CompletionCallback& finish_callback,
25 const Manifest* manifest, 25 const Manifest* manifest,
26 const Manifest* ld_manifest, 26 const Manifest* ld_manifest,
27 LocalTempFile* obj_file, 27 LocalTempFile* obj_file,
28 LocalTempFile* nexe_file, 28 LocalTempFile* nexe_file,
29 nacl::DescWrapper* pexe_wrapper,
30 ErrorInfo* error_info, 29 ErrorInfo* error_info,
31 PnaclResources* resources, 30 PnaclResources* resources,
32 Plugin* plugin); 31 Plugin* plugin);
33 32
34 // Kill the translation and/or linking processes. 33 // Kill the translation and/or linking processes.
35 virtual void SetSubprocessesShouldDie(); 34 virtual void SetSubprocessesShouldDie();
36 35
37 // Send bitcode bytes to the translator. Called from the main thread. 36 // Send bitcode bytes to the translator. Called from the main thread.
38 void PutBytes(std::vector<char>* data, int count); 37 void PutBytes(std::vector<char>* data, int count);
39 38
(...skipping 10 matching lines...) Expand all
50 struct NaClCondVar buffer_cond_; 49 struct NaClCondVar buffer_cond_;
51 // Mutex for buffer_cond_. 50 // Mutex for buffer_cond_.
52 struct NaClMutex cond_mu_; 51 struct NaClMutex cond_mu_;
53 // Data buffers from FileDownloader are enqueued here to pass from the 52 // Data buffers from FileDownloader are enqueued here to pass from the
54 // main thread to the SRPC thread. Protected by cond_mu_ 53 // main thread to the SRPC thread. Protected by cond_mu_
55 std::deque<std::vector<char> > data_buffers_; 54 std::deque<std::vector<char> > data_buffers_;
56 }; 55 };
57 56
58 } // namespace plugin 57 } // namespace plugin
59 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_STREAMING_TRANSLATE_THREAD_H_ 58 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_STREAMING_TRANSLATE_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698