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

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

Issue 2411093002: Always keep a ChannelProxy alive in RenderProcessHostImpl (Closed)
Patch Set: rebase 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 25 matching lines...) Expand all
36 // renderer via this RenderProcessHost. 36 // renderer via this RenderProcessHost.
37 IPC::TestSink& sink() { return sink_; } 37 IPC::TestSink& sink() { return sink_; }
38 38
39 // Provides test access to how many times a bad message has been received. 39 // Provides test access to how many times a bad message has been received.
40 int bad_msg_count() const { return bad_msg_count_; } 40 int bad_msg_count() const { return bad_msg_count_; }
41 41
42 // Provides tests a way to simulate this render process crashing. 42 // Provides tests a way to simulate this render process crashing.
43 void SimulateCrash(); 43 void SimulateCrash();
44 44
45 // RenderProcessHost implementation (public portion). 45 // RenderProcessHost implementation (public portion).
46 void EnableSendQueue() override;
47 bool Init() override; 46 bool Init() override;
48 int GetNextRoutingID() override; 47 int GetNextRoutingID() override;
49 void AddRoute(int32_t routing_id, IPC::Listener* listener) override; 48 void AddRoute(int32_t routing_id, IPC::Listener* listener) override;
50 void RemoveRoute(int32_t routing_id) override; 49 void RemoveRoute(int32_t routing_id) override;
51 void AddObserver(RenderProcessHostObserver* observer) override; 50 void AddObserver(RenderProcessHostObserver* observer) override;
52 void RemoveObserver(RenderProcessHostObserver* observer) override; 51 void RemoveObserver(RenderProcessHostObserver* observer) override;
53 void ShutdownForBadMessage(CrashReportMode crash_report_mode) override; 52 void ShutdownForBadMessage(CrashReportMode crash_report_mode) override;
54 void WidgetRestored() override; 53 void WidgetRestored() override;
55 void WidgetHidden() override; 54 void WidgetHidden() override;
56 int VisibleWidgetCount() const override; 55 int VisibleWidgetCount() const override;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // for deleting all MockRenderProcessHosts that have not deleted by a test in 183 // for deleting all MockRenderProcessHosts that have not deleted by a test in
185 // the destructor and prevent them from being leaked. 184 // the destructor and prevent them from being leaked.
186 mutable ScopedVector<MockRenderProcessHost> processes_; 185 mutable ScopedVector<MockRenderProcessHost> processes_;
187 186
188 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 187 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
189 }; 188 };
190 189
191 } // namespace content 190 } // namespace content
192 191
193 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 192 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_process_host.h ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698