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

Side by Side Diff: content/test/test_render_frame_host.h

Issue 2038843003: bluetooth: Don't call methods of WebContentsImpl while it's being destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address jyasskin's comments Created 4 years, 6 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 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 CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h"
Jeffrey Yasskin 2016/06/06 20:32:20 You could get by with just a forward declaration i
ortuno 2016/06/06 22:38:05 Done.
13 #include "content/browser/frame_host/render_frame_host_impl.h" 14 #include "content/browser/frame_host/render_frame_host_impl.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 #include "content/public/test/mock_render_process_host.h" 16 #include "content/public/test/mock_render_process_host.h"
16 #include "content/public/test/test_renderer_host.h" 17 #include "content/public/test/test_renderer_host.h"
17 #include "content/test/test_render_view_host.h" 18 #include "content/test/test_render_view_host.h"
18 #include "ui/base/page_transition_types.h" 19 #include "ui/base/page_transition_types.h"
19 20
20 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 21 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
21 22
22 namespace content { 23 namespace content {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Simulate a renderer-initiated navigation up until commit. 101 // Simulate a renderer-initiated navigation up until commit.
101 void NavigateAndCommitRendererInitiated(int page_id, 102 void NavigateAndCommitRendererInitiated(int page_id,
102 bool did_create_new_entry, 103 bool did_create_new_entry,
103 const GURL& url); 104 const GURL& url);
104 105
105 // With the current navigation logic this method is a no-op. 106 // With the current navigation logic this method is a no-op.
106 // PlzNavigate: this method simulates receiving a BeginNavigation IPC. 107 // PlzNavigate: this method simulates receiving a BeginNavigation IPC.
107 void SendRendererInitiatedNavigationRequest(const GURL& url, 108 void SendRendererInitiatedNavigationRequest(const GURL& url,
108 bool has_user_gesture); 109 bool has_user_gesture);
109 110
111 void SetFrameConnectedBluetoothDevices(
112 std::unique_ptr<FrameConnectedBluetoothDevices> connected_devices);
113
110 void DidChangeOpener(int opener_routing_id); 114 void DidChangeOpener(int opener_routing_id);
111 115
112 void DidEnforceStrictMixedContentChecking(); 116 void DidEnforceStrictMixedContentChecking();
113 117
114 // If set, navigations will appear to have cleared the history list in the 118 // If set, navigations will appear to have cleared the history list in the
115 // RenderFrame 119 // RenderFrame
116 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). 120 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared).
117 // False by default. 121 // False by default.
118 void set_simulate_history_list_was_cleared(bool cleared) { 122 void set_simulate_history_list_was_cleared(bool cleared) {
119 simulate_history_list_was_cleared_ = cleared; 123 simulate_history_list_was_cleared_ = cleared;
(...skipping 26 matching lines...) Expand all
146 int response_code, 150 int response_code,
147 const ModificationCallback& callback); 151 const ModificationCallback& callback);
148 152
149 // Computes the page ID for a pending navigation in this RenderFrameHost; 153 // Computes the page ID for a pending navigation in this RenderFrameHost;
150 int32_t ComputeNextPageID(); 154 int32_t ComputeNextPageID();
151 155
152 TestRenderFrameHostCreationObserver child_creation_observer_; 156 TestRenderFrameHostCreationObserver child_creation_observer_;
153 157
154 std::string contents_mime_type_; 158 std::string contents_mime_type_;
155 159
160 std::unique_ptr<FrameConnectedBluetoothDevices> connected_devices_;
Jeffrey Yasskin 2016/06/06 20:32:20 Maybe comment that this exists to test destruction
ortuno 2016/06/06 22:38:05 Done.
161
156 // See set_simulate_history_list_was_cleared() above. 162 // See set_simulate_history_list_was_cleared() above.
157 bool simulate_history_list_was_cleared_; 163 bool simulate_history_list_was_cleared_;
158 164
159 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); 165 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
160 }; 166 };
161 167
162 } // namespace content 168 } // namespace content
163 169
164 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 170 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698