| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Each time a NaCl process ends, the browser is notified. | 131 // Each time a NaCl process ends, the browser is notified. |
| 132 void OnProcessEnd(int process_id); | 132 void OnProcessEnd(int process_id); |
| 133 // Support for NaCl crash throttling. | 133 // Support for NaCl crash throttling. |
| 134 // Each time a NaCl module crashes, the browser is notified. | 134 // Each time a NaCl module crashes, the browser is notified. |
| 135 void OnProcessCrashed(); | 135 void OnProcessCrashed(); |
| 136 // If "too many" crashes occur within a given time period, NaCl is throttled | 136 // If "too many" crashes occur within a given time period, NaCl is throttled |
| 137 // until the rate again drops below the threshold. | 137 // until the rate again drops below the threshold. |
| 138 bool IsThrottled(); | 138 bool IsThrottled(); |
| 139 | 139 |
| 140 private: | 140 private: |
| 141 friend struct DefaultSingletonTraits<NaClBrowser>; | 141 friend struct base::DefaultSingletonTraits<NaClBrowser>; |
| 142 | 142 |
| 143 enum NaClResourceState { | 143 enum NaClResourceState { |
| 144 NaClResourceUninitialized, | 144 NaClResourceUninitialized, |
| 145 NaClResourceRequested, | 145 NaClResourceRequested, |
| 146 NaClResourceReady | 146 NaClResourceReady |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 NaClBrowser(); | 149 NaClBrowser(); |
| 150 ~NaClBrowser(); | 150 ~NaClBrowser(); |
| 151 | 151 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 // Singletons get destroyed at shutdown. | 201 // Singletons get destroyed at shutdown. |
| 202 base::WeakPtrFactory<NaClBrowser> weak_factory_; | 202 base::WeakPtrFactory<NaClBrowser> weak_factory_; |
| 203 | 203 |
| 204 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); | 204 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 } // namespace nacl | 207 } // namespace nacl |
| 208 | 208 |
| 209 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ | 209 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ |
| OLD | NEW |