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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2007473004: [Autofill] Migrate ContentAutofillDriver<-->AutofillAgent IPCs to mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 5 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 // An error page is expected to commit, hence why is_loading_ is set to true. 2387 // An error page is expected to commit, hence why is_loading_ is set to true.
2388 is_loading_ = true; 2388 is_loading_ = true;
2389 frame_tree_node_->ResetNavigationRequest(true); 2389 frame_tree_node_->ResetNavigationRequest(true);
2390 } 2390 }
2391 2391
2392 void RenderFrameHostImpl::SetUpMojoIfNeeded() { 2392 void RenderFrameHostImpl::SetUpMojoIfNeeded() {
2393 if (interface_registry_.get()) 2393 if (interface_registry_.get())
2394 return; 2394 return;
2395 2395
2396 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); 2396 interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
2397 if (!GetProcess()->GetRemoteInterfaces()) 2397
2398 // The RenderProcessHost may not have remote interfaces in some test
2399 // environments. In that case we create an empty InterfaceProvider so tests
2400 // can register mock implementations.
dcheng 2016/07/12 14:22:13 Can we fix the test harness (ChromeRenderViewTest,
leonhsl(Using Gerrit) 2016/07/13 03:48:31 I think even we change ChromeRenderViewTest and so
dcheng 2016/07/14 04:31:44 To help me understand better, which tests were fai
leonhsl(Using Gerrit) 2016/07/14 09:57:31 I encountered the problem in https://codereview.ch
dcheng 2016/07/19 14:34:11 I think we just need to set an InterfaceProvider f
leonhsl(Using Gerrit) 2016/07/20 03:01:07 Which on do you mean? 1, Initialize MockRenderPr
2401 if (!GetProcess()->GetRemoteInterfaces()) {
2402 remote_interfaces_.reset(new shell::InterfaceProvider);
2398 return; 2403 return;
2404 }
2399 2405
2400 RegisterMojoInterfaces(); 2406 RegisterMojoInterfaces();
2401 mojom::FrameFactoryPtr frame_factory; 2407 mojom::FrameFactoryPtr frame_factory;
2402 GetProcess()->GetRemoteInterfaces()->GetInterface(&frame_factory); 2408 GetProcess()->GetRemoteInterfaces()->GetInterface(&frame_factory);
2403 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), 2409 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_),
2404 frame_host_binding_.CreateInterfacePtrAndBind()); 2410 frame_host_binding_.CreateInterfacePtrAndBind());
2405 2411
2406 2412
2407 shell::mojom::InterfaceProviderPtr remote_interfaces; 2413 shell::mojom::InterfaceProviderPtr remote_interfaces;
2408 shell::mojom::InterfaceProviderRequest remote_interfaces_request = 2414 shell::mojom::InterfaceProviderRequest remote_interfaces_request =
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2958 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2964 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2959 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2965 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2960 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2966 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2961 } 2967 }
2962 2968
2963 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2969 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2964 web_bluetooth_service_.reset(); 2970 web_bluetooth_service_.reset();
2965 } 2971 }
2966 2972
2967 } // namespace content 2973 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698