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