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 COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ |
6 #define COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ | 6 #define COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/containers/mru_cache.h" | 11 #include "base/containers/mru_cache.h" |
| 12 #include "base/files/file.h" |
12 #include "base/files/file_util_proxy.h" | 13 #include "base/files/file_util_proxy.h" |
13 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "base/platform_file.h" | 16 #include "base/platform_file.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "components/nacl/browser/nacl_browser_delegate.h" | 18 #include "components/nacl/browser/nacl_browser_delegate.h" |
18 #include "components/nacl/browser/nacl_validation_cache.h" | 19 #include "components/nacl/browser/nacl_validation_cache.h" |
19 | 20 |
20 class URLPattern; | 21 class URLPattern; |
21 class GURL; | 22 class GURL; |
22 | 23 |
23 namespace nacl { | 24 namespace nacl { |
24 | 25 |
25 // Open an immutable executable file that can be mmapped. | 26 // Open an immutable executable file that can be mmapped. |
26 // This function should only be called on a thread that can perform file IO. | 27 // This function should only be called on a thread that can perform file IO. |
27 base::PlatformFile OpenNaClExecutableImpl(const base::FilePath& file_path); | 28 base::File OpenNaClExecutableImpl(const base::FilePath& file_path); |
28 | 29 |
29 // Represents shared state for all NaClProcessHost objects in the browser. | 30 // Represents shared state for all NaClProcessHost objects in the browser. |
30 class NaClBrowser { | 31 class NaClBrowser { |
31 public: | 32 public: |
32 static NaClBrowser* GetInstance(); | 33 static NaClBrowser* GetInstance(); |
33 | 34 |
34 // Will it be possible to launch a NaCl process, eventually? | 35 // Will it be possible to launch a NaCl process, eventually? |
35 bool IsOk() const; | 36 bool IsOk() const; |
36 | 37 |
37 // Are we ready to launch a NaCl process now? Implies IsOk(). | 38 // Are we ready to launch a NaCl process now? Implies IsOk(). |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 scoped_ptr<NaClBrowserDelegate> browser_delegate_; | 180 scoped_ptr<NaClBrowserDelegate> browser_delegate_; |
180 | 181 |
181 std::deque<base::Time> crash_times_; | 182 std::deque<base::Time> crash_times_; |
182 | 183 |
183 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); | 184 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); |
184 }; | 185 }; |
185 | 186 |
186 } // namespace nacl | 187 } // namespace nacl |
187 | 188 |
188 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ | 189 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ |
OLD | NEW |