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

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

Issue 1387963004: Create a broker interface for the new Mojo EDK so that the browser can create and duplicate messa... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 #include "ipc/ipc_channel.h" 159 #include "ipc/ipc_channel.h"
160 #include "ipc/ipc_logging.h" 160 #include "ipc/ipc_logging.h"
161 #include "ipc/ipc_switches.h" 161 #include "ipc/ipc_switches.h"
162 #include "ipc/mojo/ipc_channel_mojo.h" 162 #include "ipc/mojo/ipc_channel_mojo.h"
163 #include "media/base/media_switches.h" 163 #include "media/base/media_switches.h"
164 #include "net/url_request/url_request_context_getter.h" 164 #include "net/url_request/url_request_context_getter.h"
165 #include "ppapi/shared_impl/ppapi_switches.h" 165 #include "ppapi/shared_impl/ppapi_switches.h"
166 #include "storage/browser/fileapi/sandbox_file_system_backend.h" 166 #include "storage/browser/fileapi/sandbox_file_system_backend.h"
167 #include "third_party/icu/source/common/unicode/unistr.h" 167 #include "third_party/icu/source/common/unicode/unistr.h"
168 #include "third_party/icu/source/i18n/unicode/timezone.h" 168 #include "third_party/icu/source/i18n/unicode/timezone.h"
169 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
169 #include "third_party/skia/include/core/SkBitmap.h" 170 #include "third_party/skia/include/core/SkBitmap.h"
170 #include "ui/base/ui_base_switches.h" 171 #include "ui/base/ui_base_switches.h"
171 #include "ui/events/event_switches.h" 172 #include "ui/events/event_switches.h"
172 #include "ui/gfx/switches.h" 173 #include "ui/gfx/switches.h"
173 #include "ui/gl/gl_switches.h" 174 #include "ui/gl/gl_switches.h"
174 #include "ui/gl/gpu_switching_manager.h" 175 #include "ui/gl/gpu_switching_manager.h"
175 #include "ui/native_theme/native_theme_switches.h" 176 #include "ui/native_theme/native_theme_switches.h"
176 177
177 #if defined(OS_ANDROID) 178 #if defined(OS_ANDROID)
178 #include "content/browser/android/child_process_launcher_android.h" 179 #include "content/browser/android/child_process_launcher_android.h"
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, 2438 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED,
2438 Source<RenderProcessHost>(this), 2439 Source<RenderProcessHost>(this),
2439 NotificationService::NoDetails()); 2440 NotificationService::NoDetails());
2440 2441
2441 #if defined(MOJO_SHELL_CLIENT) 2442 #if defined(MOJO_SHELL_CLIENT)
2442 // Send a handle that the external Mojo shell can use to pass an Application 2443 // Send a handle that the external Mojo shell can use to pass an Application
2443 // request to the child. 2444 // request to the child.
2444 RegisterChildWithExternalShell(id_, GetHandle(), this); 2445 RegisterChildWithExternalShell(id_, GetHandle(), this);
2445 #endif 2446 #endif
2446 2447
2448 #if defined(OS_WIN)
2449 if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk") &&
2450 child_process_launcher_.get()) {
2451 HANDLE process_handle = child_process_launcher_->GetProcess().Handle();
2452 HANDLE client_pipe = mojo::embedder::ChildProcessLaunched(process_handle);
2453 Send(new ChildProcessMsg_SetMojoParentPipeHandle(
2454 IPC::GetFileHandleForProcess(client_pipe, process_handle, true)));
2455 }
2456 #endif
2457
2447 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. 2458 // 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 2459 // This way, Mojo can be safely used from the renderer in response to any
2449 // Chrome IPC message. 2460 // Chrome IPC message.
2450 mojo_application_host_->Activate(this, GetHandle()); 2461 mojo_application_host_->Activate(this, GetHandle());
2451 2462
2452 while (!queued_messages_.empty()) { 2463 while (!queued_messages_.empty()) {
2453 Send(queued_messages_.front()); 2464 Send(queued_messages_.front());
2454 queued_messages_.pop(); 2465 queued_messages_.pop();
2455 } 2466 }
2456 2467
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 void RenderProcessHostImpl::GetAudioOutputControllers( 2620 void RenderProcessHostImpl::GetAudioOutputControllers(
2610 const GetAudioOutputControllersCallback& callback) const { 2621 const GetAudioOutputControllersCallback& callback) const {
2611 audio_renderer_host()->GetOutputControllers(callback); 2622 audio_renderer_host()->GetOutputControllers(callback);
2612 } 2623 }
2613 2624
2614 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2625 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2615 return bluetooth_dispatcher_host_.get(); 2626 return bluetooth_dispatcher_host_.get();
2616 } 2627 }
2617 2628
2618 } // namespace content 2629 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698