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

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

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 moar 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 #include "content/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h"
8 #include "content/browser/frame_host/frame_tree.h" 9 #include "content/browser/frame_host/frame_tree.h"
9 #include "content/browser/frame_host/navigation_handle_impl.h" 10 #include "content/browser/frame_host/navigation_handle_impl.h"
10 #include "content/browser/frame_host/navigation_request.h" 11 #include "content/browser/frame_host/navigation_request.h"
11 #include "content/browser/frame_host/navigator.h" 12 #include "content/browser/frame_host/navigator.h"
12 #include "content/browser/frame_host/navigator_impl.h" 13 #include "content/browser/frame_host/navigator_impl.h"
13 #include "content/browser/frame_host/render_frame_host_delegate.h" 14 #include "content/browser/frame_host/render_frame_host_delegate.h"
14 #include "content/browser/web_contents/web_contents_impl.h" 15 #include "content/browser/web_contents/web_contents_impl.h"
15 #include "content/common/frame_messages.h" 16 #include "content/common/frame_messages.h"
16 #include "content/public/browser/stream_handle.h" 17 #include "content/public/browser/stream_handle.h"
17 #include "content/public/common/browser_side_navigation_policy.h" 18 #include "content/public/common/browser_side_navigation_policy.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 has_user_gesture, false, 367 has_user_gesture, false,
367 REQUEST_CONTEXT_TYPE_HYPERLINK); 368 REQUEST_CONTEXT_TYPE_HYPERLINK);
368 CommonNavigationParams common_params; 369 CommonNavigationParams common_params;
369 common_params.url = url; 370 common_params.url = url;
370 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); 371 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault);
371 common_params.transition = ui::PAGE_TRANSITION_LINK; 372 common_params.transition = ui::PAGE_TRANSITION_LINK;
372 OnBeginNavigation(common_params, begin_params); 373 OnBeginNavigation(common_params, begin_params);
373 } 374 }
374 } 375 }
375 376
377 void TestRenderFrameHost::SetFrameConnectedBluetoothDevices(
378 std::unique_ptr<FrameConnectedBluetoothDevices> connected_devices) {
379 connected_devices_ = std::move(connected_devices);
380 }
381
376 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { 382 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) {
377 OnDidChangeOpener(opener_routing_id); 383 OnDidChangeOpener(opener_routing_id);
378 } 384 }
379 385
380 void TestRenderFrameHost::DidEnforceStrictMixedContentChecking() { 386 void TestRenderFrameHost::DidEnforceStrictMixedContentChecking() {
381 OnEnforceStrictMixedContentChecking(); 387 OnEnforceStrictMixedContentChecking();
382 } 388 }
383 389
384 void TestRenderFrameHost::PrepareForCommit() { 390 void TestRenderFrameHost::PrepareForCommit() {
385 PrepareForCommitWithServerRedirect(GURL()); 391 PrepareForCommitWithServerRedirect(GURL());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // cleared during DidFailProvisionalLoad). 437 // cleared during DidFailProvisionalLoad).
432 int page_id = entry ? entry->GetPageID() : -1; 438 int page_id = entry ? entry->GetPageID() : -1;
433 if (page_id == -1) { 439 if (page_id == -1) {
434 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 440 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
435 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 441 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
436 } 442 }
437 return page_id; 443 return page_id;
438 } 444 }
439 445
440 } // namespace content 446 } // namespace content
OLDNEW
« content/test/test_render_frame_host.h ('K') | « content/test/test_render_frame_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698