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

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

Issue 1142063003: content/child: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Created 5 years, 7 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
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 "base/callback.h" 10 #include "base/callback.h"
(...skipping 13 matching lines...) Expand all
24 // files, and cached translations). 24 // files, and cached translations).
25 25
26 // "Resource" might not be the best name for the various things that pnacl 26 // "Resource" might not be the best name for the various things that pnacl
27 // needs from the browser since "Resource" is a Pepper thing... 27 // needs from the browser since "Resource" is a Pepper thing...
28 class PnaclTranslationResourceHost : public IPC::MessageFilter { 28 class PnaclTranslationResourceHost : public IPC::MessageFilter {
29 public: 29 public:
30 typedef base::Callback<void(int32_t, bool, PP_FileHandle)> 30 typedef base::Callback<void(int32_t, bool, PP_FileHandle)>
31 RequestNexeFdCallback; 31 RequestNexeFdCallback;
32 32
33 explicit PnaclTranslationResourceHost( 33 explicit PnaclTranslationResourceHost(
34 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); 34 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner);
35 void RequestNexeFd(int render_view_id, 35 void RequestNexeFd(int render_view_id,
36 PP_Instance instance, 36 PP_Instance instance,
37 const nacl::PnaclCacheInfo& cache_info, 37 const nacl::PnaclCacheInfo& cache_info,
38 RequestNexeFdCallback callback); 38 RequestNexeFdCallback callback);
39 void ReportTranslationFinished(PP_Instance instance, PP_Bool success); 39 void ReportTranslationFinished(PP_Instance instance, PP_Bool success);
40 40
41 protected: 41 protected:
42 ~PnaclTranslationResourceHost() override; 42 ~PnaclTranslationResourceHost() override;
43 43
44 private: 44 private:
(...skipping 11 matching lines...) Expand all
56 PP_Instance instance, 56 PP_Instance instance,
57 const nacl::PnaclCacheInfo& cache_info, 57 const nacl::PnaclCacheInfo& cache_info,
58 RequestNexeFdCallback callback); 58 RequestNexeFdCallback callback);
59 void SendReportTranslationFinished(PP_Instance instance, 59 void SendReportTranslationFinished(PP_Instance instance,
60 PP_Bool success); 60 PP_Bool success);
61 void OnNexeTempFileReply(PP_Instance instance, 61 void OnNexeTempFileReply(PP_Instance instance,
62 bool is_hit, 62 bool is_hit,
63 IPC::PlatformFileForTransit file); 63 IPC::PlatformFileForTransit file);
64 void CleanupCacheRequests(); 64 void CleanupCacheRequests();
65 65
66 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 66 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
67 67
68 // Should be accessed on the io thread. 68 // Should be accessed on the io thread.
69 IPC::Sender* sender_; 69 IPC::Sender* sender_;
70 CacheRequestInfoMap pending_cache_requests_; 70 CacheRequestInfoMap pending_cache_requests_;
71 DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost); 71 DISALLOW_COPY_AND_ASSIGN(PnaclTranslationResourceHost);
72 }; 72 };
73 73
74 #endif // CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_ 74 #endif // CHROME_RENDERER_PEPPER_PNACL_TRANSLATION_RESOURCE_HOST_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.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