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

Side by Side Diff: chrome/renderer/pepper/pnacl_translation_resource_host.h

Issue 22309007: Add success status to ReportTranslationFinished in ppb_nacl_private and IPC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test Created 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_ 5 #ifndef CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_
6 #define CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_ 6 #define CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 15 matching lines...) Expand all
26 class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter { 26 class PnaclTranslationResourceHost : public IPC::ChannelProxy::MessageFilter {
27 public: 27 public:
28 explicit PnaclTranslationResourceHost( 28 explicit PnaclTranslationResourceHost(
29 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); 29 const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
30 void RequestNexeFd(int render_view_id, 30 void RequestNexeFd(int render_view_id,
31 PP_Instance instance, 31 PP_Instance instance,
32 const nacl::PnaclCacheInfo& cache_info, 32 const nacl::PnaclCacheInfo& cache_info,
33 PP_Bool* is_hit, 33 PP_Bool* is_hit,
34 PP_FileHandle* file_handle, 34 PP_FileHandle* file_handle,
35 scoped_refptr<ppapi::TrackedCallback> callback); 35 scoped_refptr<ppapi::TrackedCallback> callback);
36 void ReportTranslationFinished(PP_Instance instance); 36 void ReportTranslationFinished(PP_Instance instance, PP_Bool error);
jvoung (off chromium) 2013/08/06 18:35:28 replace "error" with "success" ?
Derek Schuff 2013/08/06 21:21:13 Ah yeah... it was originally "error" but I replace
37 37
38 // Ensure that PNaCl resources (pnacl-llc.nexe, linker, libs) are installed. 38 // Ensure that PNaCl resources (pnacl-llc.nexe, linker, libs) are installed.
39 void EnsurePnaclInstalled(PP_Instance instance, 39 void EnsurePnaclInstalled(PP_Instance instance,
40 scoped_refptr<ppapi::TrackedCallback> callback); 40 scoped_refptr<ppapi::TrackedCallback> callback);
41 41
42 protected: 42 protected:
43 virtual ~PnaclTranslationResourceHost(); 43 virtual ~PnaclTranslationResourceHost();
44 44
45 private: 45 private:
46 class CacheRequestInfo { 46 class CacheRequestInfo {
(...skipping 20 matching lines...) Expand all
67 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; 67 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
68 virtual void OnFilterRemoved() OVERRIDE; 68 virtual void OnFilterRemoved() OVERRIDE;
69 virtual void OnChannelClosing() OVERRIDE; 69 virtual void OnChannelClosing() OVERRIDE;
70 70
71 void SendRequestNexeFd(int render_view_id, 71 void SendRequestNexeFd(int render_view_id,
72 PP_Instance instance, 72 PP_Instance instance,
73 const nacl::PnaclCacheInfo& cache_info, 73 const nacl::PnaclCacheInfo& cache_info,
74 PP_Bool* is_hit, 74 PP_Bool* is_hit,
75 PP_FileHandle* file_handle, 75 PP_FileHandle* file_handle,
76 scoped_refptr<ppapi::TrackedCallback> callback); 76 scoped_refptr<ppapi::TrackedCallback> callback);
77 void SendReportTranslationFinished(PP_Instance instance); 77 void SendReportTranslationFinished(PP_Instance instance,
78 PP_Bool success);
78 void SendEnsurePnaclInstalled(PP_Instance instance, 79 void SendEnsurePnaclInstalled(PP_Instance instance,
79 scoped_refptr<ppapi::TrackedCallback> callback); 80 scoped_refptr<ppapi::TrackedCallback> callback);
80 81
81 void OnNexeTempFileReply(PP_Instance instance, 82 void OnNexeTempFileReply(PP_Instance instance,
82 bool is_hit, 83 bool is_hit,
83 IPC::PlatformFileForTransit file); 84 IPC::PlatformFileForTransit file);
84 void CleanupCacheRequests(); 85 void CleanupCacheRequests();
85 void OnEnsurePnaclInstalledReply(PP_Instance instance, bool success); 86 void OnEnsurePnaclInstalledReply(PP_Instance instance, bool success);
86 void CleanupEnsurePnaclRequests(); 87 void CleanupEnsurePnaclRequests();
87 88
88 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 89 scoped_refptr<base::MessageLoopProxy> io_message_loop_;
89 90
90 // Should be accessed on the io thread. 91 // Should be accessed on the io thread.
91 IPC::Channel* channel_; 92 IPC::Channel* channel_;
92 CacheRequestInfoMap pending_cache_requests_; 93 CacheRequestInfoMap pending_cache_requests_;
93 EnsurePnaclInstalledList pending_ensure_pnacl_requests_; 94 EnsurePnaclInstalledList pending_ensure_pnacl_requests_;
94 DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost); 95 DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost);
95 }; 96 };
96 97
97 #endif // CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_ 98 #endif // CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698