Chromium Code Reviews| 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_BROWSER_NACL_HOST_PNACL_HOST_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ |
| 6 #define CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_ | 6 #define COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
| 14 #include "chrome/browser/nacl_host/nacl_file_host.h" | 14 #include "components/nacl/browser/nacl_file_host.h" |
| 15 #include "components/nacl/common/pnacl_types.h" | 15 #include "components/nacl/common/pnacl_types.h" |
| 16 #include "ipc/ipc_platform_file.h" | 16 #include "ipc/ipc_platform_file.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 class DrainableIOBuffer; | 19 class DrainableIOBuffer; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace pnacl { | 22 namespace pnacl { |
|
Mark Seaborn
2013/11/21 23:47:34
Add empty line after this
| |
| 23 class PnaclHostTest; | 23 class PnaclHostTest; |
| 24 class PnaclTranslationCache; | 24 class PnaclTranslationCache; |
| 25 } | |
| 26 | 25 |
| 27 // Shared state (translation cache) and common utilities (temp file creation) | 26 // Shared state (translation cache) and common utilities (temp file creation) |
| 28 // for all PNaCl translations. Unless otherwise specified, all methods should be | 27 // for all PNaCl translations. Unless otherwise specified, all methods should be |
| 29 // called on the IO thread. | 28 // called on the IO thread. |
| 30 class PnaclHost { | 29 class PnaclHost { |
| 31 public: | 30 public: |
| 32 typedef base::Callback<void(base::PlatformFile)> TempFileCallback; | 31 typedef base::Callback<void(base::PlatformFile)> TempFileCallback; |
| 33 typedef base::Callback<void(base::PlatformFile, bool is_hit)> NexeFdCallback; | 32 typedef base::Callback<void(base::PlatformFile, bool is_hit)> NexeFdCallback; |
| 34 | 33 |
| 35 static PnaclHost* GetInstance(); | 34 static PnaclHost* GetInstance(); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 int pending_backend_operations_; | 165 int pending_backend_operations_; |
| 167 CacheState cache_state_; | 166 CacheState cache_state_; |
| 168 base::FilePath temp_dir_; | 167 base::FilePath temp_dir_; |
| 169 scoped_ptr<pnacl::PnaclTranslationCache> disk_cache_; | 168 scoped_ptr<pnacl::PnaclTranslationCache> disk_cache_; |
| 170 PendingTranslationMap pending_translations_; | 169 PendingTranslationMap pending_translations_; |
| 171 base::ThreadChecker thread_checker_; | 170 base::ThreadChecker thread_checker_; |
| 172 base::WeakPtrFactory<PnaclHost> weak_factory_; | 171 base::WeakPtrFactory<PnaclHost> weak_factory_; |
| 173 DISALLOW_COPY_AND_ASSIGN(PnaclHost); | 172 DISALLOW_COPY_AND_ASSIGN(PnaclHost); |
| 174 }; | 173 }; |
| 175 | 174 |
| 176 #endif // CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_ | 175 } // namespace pnacl |
| 176 | |
| 177 #endif // COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ | |
| OLD | NEW |