| Index: components/nacl/browser/nacl_browser.h
|
| diff --git a/components/nacl/browser/nacl_browser.h b/components/nacl/browser/nacl_browser.h
|
| index 651e2f8692e3ec0b2c7ff0878c4a8a725ed08c5e..51d19e4efdd89512bdbaa17ee85579c58c01ef57 100644
|
| --- a/components/nacl/browser/nacl_browser.h
|
| +++ b/components/nacl/browser/nacl_browser.h
|
| @@ -25,6 +25,9 @@ class FileProxy;
|
|
|
| namespace nacl {
|
|
|
| +static const int kGdbDebugStubPortUnknown = -1;
|
| +static const int kGdbDebugStubPortUnused = 0;
|
| +
|
| // Open an immutable executable file that can be mmapped.
|
| // This function should only be called on a thread that can perform file IO.
|
| base::File OpenNaClExecutableImpl(const base::FilePath& file_path);
|
| @@ -65,11 +68,12 @@ class NaClBrowser {
|
| // debug stub server instead of a fixed one.
|
|
|
| // Notify listener that new debug stub TCP port is allocated.
|
| - void FireGdbDebugStubPortOpened(int port);
|
| - bool HasGdbDebugStubPortListener();
|
| + void SetProcessGdbDebugStubPort(int process_id, int port);
|
| void SetGdbDebugStubPortListener(base::Callback<void(int)> listener);
|
| void ClearGdbDebugStubPortListener();
|
|
|
| + int GetProcessGdbDebugStubPort(int process_id);
|
| +
|
| bool ValidationCacheIsEnabled() const {
|
| return validation_cache_is_enabled_;
|
| }
|
| @@ -117,6 +121,8 @@ class NaClBrowser {
|
| static void SetDelegate(NaClBrowserDelegate* delegate);
|
| static NaClBrowserDelegate* GetDelegate();
|
|
|
| + // Each time a NaCl process ends, the browser is notified.
|
| + void OnProcessEnd(int process_id);
|
| // Support for NaCl crash throttling.
|
| // Each time a NaCl module crashes, the browser is notified.
|
| void OnProcessCrashed();
|
| @@ -171,6 +177,10 @@ class NaClBrowser {
|
| NaClResourceState validation_cache_state_;
|
| base::Callback<void(int)> debug_stub_port_listener_;
|
|
|
| + // Map from process id to debug stub port if any.
|
| + typedef std::map<int, int> GdbDebugStubPortMap;
|
| + GdbDebugStubPortMap gdb_debug_stub_port_map_;
|
| +
|
| typedef base::HashingMRUCache<std::string, base::FilePath> PathCacheType;
|
| PathCacheType path_cache_;
|
|
|
|
|