| OLD | NEW |
| 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_NACL_NACL_LISTENER_H_ | 5 #ifndef CHROME_NACL_NACL_LISTENER_H_ |
| 6 #define CHROME_NACL_NACL_LISTENER_H_ | 6 #define CHROME_NACL_NACL_LISTENER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 bool OnMessageReceived(const IPC::Message& msg) override; | 67 bool OnMessageReceived(const IPC::Message& msg) override; |
| 68 | 68 |
| 69 typedef base::Callback<void(const IPC::Message&, | 69 typedef base::Callback<void(const IPC::Message&, |
| 70 IPC::PlatformFileForTransit, | 70 IPC::PlatformFileForTransit, |
| 71 base::FilePath)> OpenResourceReplyCallback; | 71 base::FilePath)> OpenResourceReplyCallback; |
| 72 | 72 |
| 73 bool OnOpenResource(const IPC::Message& msg, | 73 bool OnOpenResource(const IPC::Message& msg, |
| 74 const std::string& key, | 74 const std::string& key, |
| 75 OpenResourceReplyCallback cb); | 75 OpenResourceReplyCallback cb); |
| 76 | 76 |
| 77 void OnAddPrefetchedResource( |
| 78 const nacl::NaClResourcePrefetchResult& prefetched_resource_file); |
| 77 void OnStart(const nacl::NaClStartParams& params); | 79 void OnStart(const nacl::NaClStartParams& params); |
| 78 | 80 |
| 79 // A channel back to the browser. | 81 // A channel back to the browser. |
| 80 scoped_ptr<IPC::SyncChannel> channel_; | 82 scoped_ptr<IPC::SyncChannel> channel_; |
| 81 | 83 |
| 82 // A filter that allows other threads to use the channel. | 84 // A filter that allows other threads to use the channel. |
| 83 scoped_refptr<IPC::SyncMessageFilter> filter_; | 85 scoped_refptr<IPC::SyncMessageFilter> filter_; |
| 84 | 86 |
| 85 base::WaitableEvent shutdown_event_; | 87 base::WaitableEvent shutdown_event_; |
| 86 base::Thread io_thread_; | 88 base::Thread io_thread_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 105 | 107 |
| 106 // Used to identify what thread we're on. | 108 // Used to identify what thread we're on. |
| 107 base::MessageLoop* main_loop_; | 109 base::MessageLoop* main_loop_; |
| 108 | 110 |
| 109 typedef std::map< | 111 typedef std::map< |
| 110 std::string, // manifest key | 112 std::string, // manifest key |
| 111 std::pair<IPC::PlatformFileForTransit, | 113 std::pair<IPC::PlatformFileForTransit, |
| 112 base::FilePath> > PrefetchedResourceFilesMap; | 114 base::FilePath> > PrefetchedResourceFilesMap; |
| 113 PrefetchedResourceFilesMap prefetched_resource_files_; | 115 PrefetchedResourceFilesMap prefetched_resource_files_; |
| 114 | 116 |
| 117 bool is_started_; |
| 118 |
| 115 DISALLOW_COPY_AND_ASSIGN(NaClListener); | 119 DISALLOW_COPY_AND_ASSIGN(NaClListener); |
| 116 }; | 120 }; |
| 117 | 121 |
| 118 #endif // CHROME_NACL_NACL_LISTENER_H_ | 122 #endif // CHROME_NACL_NACL_LISTENER_H_ |
| OLD | NEW |