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

Side by Side Diff: components/nacl/renderer/pnacl_translation_resource_host.h

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 9
10 #include "ipc/ipc_platform_file.h" 10 #include "ipc/ipc_platform_file.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 PP_Bool* is_hit; 49 PP_Bool* is_hit;
50 PP_FileHandle* file_handle; 50 PP_FileHandle* file_handle;
51 scoped_refptr<ppapi::TrackedCallback> callback; 51 scoped_refptr<ppapi::TrackedCallback> callback;
52 }; 52 };
53 53
54 // Maps the instance with an outstanding cache request to the info 54 // Maps the instance with an outstanding cache request to the info
55 // about that request. 55 // about that request.
56 typedef std::map<PP_Instance, CacheRequestInfo> CacheRequestInfoMap; 56 typedef std::map<PP_Instance, CacheRequestInfo> CacheRequestInfoMap;
57 // IPC::MessageFilter implementation. 57 // IPC::MessageFilter implementation.
58 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 58 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
59 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; 59 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
60 virtual void OnFilterRemoved() OVERRIDE; 60 virtual void OnFilterRemoved() OVERRIDE;
61 virtual void OnChannelClosing() OVERRIDE; 61 virtual void OnChannelClosing() OVERRIDE;
62 62
63 void SendRequestNexeFd(int render_view_id, 63 void SendRequestNexeFd(int render_view_id,
64 PP_Instance instance, 64 PP_Instance instance,
65 const nacl::PnaclCacheInfo& cache_info, 65 const nacl::PnaclCacheInfo& cache_info,
66 PP_Bool* is_hit, 66 PP_Bool* is_hit,
67 PP_FileHandle* file_handle, 67 PP_FileHandle* file_handle,
68 scoped_refptr<ppapi::TrackedCallback> callback); 68 scoped_refptr<ppapi::TrackedCallback> callback);
69 void SendReportTranslationFinished(PP_Instance instance, 69 void SendReportTranslationFinished(PP_Instance instance,
70 PP_Bool success); 70 PP_Bool success);
71 void OnNexeTempFileReply(PP_Instance instance, 71 void OnNexeTempFileReply(PP_Instance instance,
72 bool is_hit, 72 bool is_hit,
73 IPC::PlatformFileForTransit file); 73 IPC::PlatformFileForTransit file);
74 void CleanupCacheRequests(); 74 void CleanupCacheRequests();
75 75
76 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 76 scoped_refptr<base::MessageLoopProxy> io_message_loop_;
77 77
78 // Should be accessed on the io thread. 78 // Should be accessed on the io thread.
79 IPC::Channel* channel_; 79 IPC::Sender* sender_;
80 CacheRequestInfoMap pending_cache_requests_; 80 CacheRequestInfoMap pending_cache_requests_;
81 DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost); 81 DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost);
82 }; 82 };
83 83
84 #endif // CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_ 84 #endif // CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/webrtc_logging_message_filter.cc ('k') | components/nacl/renderer/pnacl_translation_resource_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698