Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: content/public/test/mock_render_process_host.h

Issue 2387603003: Resume a backgrounded renderer that was purged and suspended (Closed)
Patch Set: Use constexpr base::TimeDelta Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <memory> 10 #include <memory>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 override; 98 override;
99 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; 99 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
100 bool IsProcessBackgrounded() const override; 100 bool IsProcessBackgrounded() const override;
101 void IncrementServiceWorkerRefCount() override; 101 void IncrementServiceWorkerRefCount() override;
102 void DecrementServiceWorkerRefCount() override; 102 void DecrementServiceWorkerRefCount() override;
103 void IncrementSharedWorkerRefCount() override; 103 void IncrementSharedWorkerRefCount() override;
104 void DecrementSharedWorkerRefCount() override; 104 void DecrementSharedWorkerRefCount() override;
105 void ForceReleaseWorkerRefCounts() override; 105 void ForceReleaseWorkerRefCounts() override;
106 bool IsWorkerRefCountDisabled() override; 106 bool IsWorkerRefCountDisabled() override;
107 void PurgeAndSuspend() override; 107 void PurgeAndSuspend() override;
108 void Resume() override;
109 const base::TimeTicks& GetLastPurgedAndSuspendedTime() const override;
110 const base::TimeTicks& GetLastResumedInBackgroundTime() const override;
108 111
109 // IPC::Sender via RenderProcessHost. 112 // IPC::Sender via RenderProcessHost.
110 bool Send(IPC::Message* msg) override; 113 bool Send(IPC::Message* msg) override;
111 114
112 // IPC::Listener via RenderProcessHost. 115 // IPC::Listener via RenderProcessHost.
113 bool OnMessageReceived(const IPC::Message& msg) override; 116 bool OnMessageReceived(const IPC::Message& msg) override;
114 void OnChannelConnected(int32_t peer_pid) override; 117 void OnChannelConnected(int32_t peer_pid) override;
115 118
116 // Attaches the factory object so we can remove this object in its destructor 119 // Attaches the factory object so we can remove this object in its destructor
117 // and prevent MockRenderProcessHostFacotry from deleting it. 120 // and prevent MockRenderProcessHostFacotry from deleting it.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // for deleting all MockRenderProcessHosts that have not deleted by a test in 187 // for deleting all MockRenderProcessHosts that have not deleted by a test in
185 // the destructor and prevent them from being leaked. 188 // the destructor and prevent them from being leaked.
186 mutable ScopedVector<MockRenderProcessHost> processes_; 189 mutable ScopedVector<MockRenderProcessHost> processes_;
187 190
188 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 191 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
189 }; 192 };
190 193
191 } // namespace content 194 } // namespace content
192 195
193 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 196 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698