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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1476643002: mustash: Enable connections to mus from the Chrome renderer [take 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create a RenderWidgetWindowTreeeClientFactory in tests Created 5 years 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 // render process. This ensures that when a test is being run in one of the 567 // render process. This ensures that when a test is being run in one of the
568 // single process modes, the global attachment broker is the privileged 568 // single process modes, the global attachment broker is the privileged
569 // attachment broker, rather than an unprivileged attachment broker. 569 // attachment broker, rather than an unprivileged attachment broker.
570 #if defined(OS_MACOSX) && !defined(OS_IOS) 570 #if defined(OS_MACOSX) && !defined(OS_IOS)
571 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( 571 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(
572 MachBroker::GetInstance()); 572 MachBroker::GetInstance());
573 #else 573 #else
574 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); 574 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded();
575 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 575 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
576 #endif // USE_ATTACHMENT_BROKER 576 #endif // USE_ATTACHMENT_BROKER
577
578 #if defined(MOJO_SHELL_CLIENT)
579 RegisterChildWithExternalShell(id_, this);
580 #endif
577 } 581 }
578 582
579 // static 583 // static
580 void RenderProcessHostImpl::ShutDownInProcessRenderer() { 584 void RenderProcessHostImpl::ShutDownInProcessRenderer() {
581 DCHECK(g_run_renderer_in_process_); 585 DCHECK(g_run_renderer_in_process_);
582 586
583 switch (g_all_hosts.Pointer()->size()) { 587 switch (g_all_hosts.Pointer()->size()) {
584 case 0: 588 case 0:
585 return; 589 return;
586 case 1: { 590 case 1: {
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 // with state that must be there before any JavaScript executes. 2436 // with state that must be there before any JavaScript executes.
2433 // 2437 //
2434 // The queued messages contain such things as "navigate". If this notification 2438 // The queued messages contain such things as "navigate". If this notification
2435 // was after, we can end up executing JavaScript before the initialization 2439 // was after, we can end up executing JavaScript before the initialization
2436 // happens. 2440 // happens.
2437 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, 2441 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED,
2438 Source<RenderProcessHost>(this), 2442 Source<RenderProcessHost>(this),
2439 NotificationService::NoDetails()); 2443 NotificationService::NoDetails());
2440 2444
2441 #if defined(MOJO_SHELL_CLIENT) 2445 #if defined(MOJO_SHELL_CLIENT)
2442 // Send a handle that the external Mojo shell can use to pass an Application 2446 // Send the mojo shell handle to the renderer.
2443 // request to the child. 2447 SendExternalMojoShellHandleToChild(GetHandle(), this);
2444 RegisterChildWithExternalShell(id_, GetHandle(), this);
2445 #endif 2448 #endif
2446 2449
2447 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. 2450 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages.
2448 // This way, Mojo can be safely used from the renderer in response to any 2451 // This way, Mojo can be safely used from the renderer in response to any
2449 // Chrome IPC message. 2452 // Chrome IPC message.
2450 mojo_application_host_->Activate(this, GetHandle()); 2453 mojo_application_host_->Activate(this, GetHandle());
2451 2454
2452 while (!queued_messages_.empty()) { 2455 while (!queued_messages_.empty()) {
2453 Send(queued_messages_.front()); 2456 Send(queued_messages_.front());
2454 queued_messages_.pop(); 2457 queued_messages_.pop();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 void RenderProcessHostImpl::GetAudioOutputControllers( 2612 void RenderProcessHostImpl::GetAudioOutputControllers(
2610 const GetAudioOutputControllersCallback& callback) const { 2613 const GetAudioOutputControllersCallback& callback) const {
2611 audio_renderer_host()->GetOutputControllers(callback); 2614 audio_renderer_host()->GetOutputControllers(callback);
2612 } 2615 }
2613 2616
2614 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2617 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2615 return bluetooth_dispatcher_host_.get(); 2618 return bluetooth_dispatcher_host_.get();
2616 } 2619 }
2617 2620
2618 } // namespace content 2621 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698