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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class FileProxy; | 23 class FileProxy; |
24 } | 24 } |
25 | 25 |
26 namespace nacl { | 26 namespace nacl { |
27 | 27 |
28 static const int kGdbDebugStubPortUnknown = -1; | 28 static const int kGdbDebugStubPortUnknown = -1; |
29 static const int kGdbDebugStubPortUnused = 0; | 29 static const int kGdbDebugStubPortUnused = 0; |
30 | 30 |
31 // Open an immutable executable file that can be mmapped. | 31 // Open an immutable executable file that can be mmapped (or a read-only file). |
32 // This function should only be called on a thread that can perform file IO. | 32 // This function should only be called on a thread that can perform file IO. |
33 base::File OpenNaClExecutableImpl(const base::FilePath& file_path); | 33 base::File OpenNaClReadExecImpl(const base::FilePath& file_path, |
| 34 bool is_executable); |
34 | 35 |
35 // Represents shared state for all NaClProcessHost objects in the browser. | 36 // Represents shared state for all NaClProcessHost objects in the browser. |
36 class NaClBrowser { | 37 class NaClBrowser { |
37 public: | 38 public: |
38 static NaClBrowser* GetInstance(); | 39 static NaClBrowser* GetInstance(); |
39 | 40 |
40 // Will it be possible to launch a NaCl process, eventually? | 41 // Will it be possible to launch a NaCl process, eventually? |
41 bool IsOk() const; | 42 bool IsOk() const; |
42 | 43 |
43 // Are we ready to launch a NaCl process now? Implies IsOk(). | 44 // Are we ready to launch a NaCl process now? Implies IsOk(). |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 scoped_ptr<NaClBrowserDelegate> browser_delegate_; | 199 scoped_ptr<NaClBrowserDelegate> browser_delegate_; |
199 | 200 |
200 std::deque<base::Time> crash_times_; | 201 std::deque<base::Time> crash_times_; |
201 | 202 |
202 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); | 203 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); |
203 }; | 204 }; |
204 | 205 |
205 } // namespace nacl | 206 } // namespace nacl |
206 | 207 |
207 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ | 208 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ |
OLD | NEW |