| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void DidEvaluateWorkerScript(bool success) override; | 80 void DidEvaluateWorkerScript(bool success) override; |
| 81 void WillDestroyWorkerGlobalScope() override; | 81 void WillDestroyWorkerGlobalScope() override; |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 InProcessWorkerObjectProxy(const WeakPtr<InProcessWorkerMessagingProxy>&, | 84 InProcessWorkerObjectProxy(const WeakPtr<InProcessWorkerMessagingProxy>&, |
| 85 ParentFrameTaskRunners*); | 85 ParentFrameTaskRunners*); |
| 86 | 86 |
| 87 WeakPtr<ThreadedMessagingProxyBase> MessagingProxyWeakPtr() final; | 87 WeakPtr<ThreadedMessagingProxyBase> MessagingProxyWeakPtr() final; |
| 88 | 88 |
| 89 private: | 89 private: |
| 90 friend class InProcessWorkerMessagingProxyForTest; | 90 friend class InProcessWorkerObjectProxyForTest; |
| 91 | 91 |
| 92 void StartPendingActivityTimer(); | 92 void StartPendingActivityTimer(); |
| 93 void CheckPendingActivity(TimerBase*); | 93 void CheckPendingActivity(TimerBase*); |
| 94 | 94 |
| 95 // No guarantees about the lifetimes of tasks posted by this proxy wrt the | 95 // No guarantees about the lifetimes of tasks posted by this proxy wrt the |
| 96 // InProcessWorkerMessagingProxy so a weak pointer must be used when posting | 96 // InProcessWorkerMessagingProxy so a weak pointer must be used when posting |
| 97 // the tasks. | 97 // the tasks. |
| 98 WeakPtr<InProcessWorkerMessagingProxy> messaging_proxy_weak_ptr_; | 98 WeakPtr<InProcessWorkerMessagingProxy> messaging_proxy_weak_ptr_; |
| 99 | 99 |
| 100 // Used for checking pending activities on the worker global scope. This is | 100 // Used for checking pending activities on the worker global scope. This is |
| (...skipping 12 matching lines...) Expand all Loading... |
| 113 // The max interval duration of the timer. This is usually kMaxIntervalInSec | 113 // The max interval duration of the timer. This is usually kMaxIntervalInSec |
| 114 // but made as a member variable for testing. | 114 // but made as a member variable for testing. |
| 115 double max_interval_in_sec_; | 115 double max_interval_in_sec_; |
| 116 | 116 |
| 117 CrossThreadPersistent<WorkerGlobalScope> worker_global_scope_; | 117 CrossThreadPersistent<WorkerGlobalScope> worker_global_scope_; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace blink | 120 } // namespace blink |
| 121 | 121 |
| 122 #endif // InProcessWorkerObjectProxy_h | 122 #endif // InProcessWorkerObjectProxy_h |
| OLD | NEW |