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

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: presubmit whitespace error Created 5 years, 1 month 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 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, 2437 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED,
2437 Source<RenderProcessHost>(this), 2438 Source<RenderProcessHost>(this),
2438 NotificationService::NoDetails()); 2439 NotificationService::NoDetails());
2439 2440
2440 #if defined(MOJO_SHELL_CLIENT) 2441 #if defined(MOJO_SHELL_CLIENT)
2441 // Send a handle that the external Mojo shell can use to pass an Application 2442 // Send a handle that the external Mojo shell can use to pass an Application
2442 // request to the child. 2443 // request to the child.
2443 RegisterChildWithExternalShell(id_, GetHandle(), this); 2444 RegisterChildWithExternalShell(id_, GetHandle(), this);
2444 #endif 2445 #endif
2445 2446
2447 #if defined(OS_WIN)
2448 if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk") &&
2449 child_process_launcher_.get()) {
2450 HANDLE process_handle = child_process_launcher_->GetProcess().Handle();
2451 HANDLE client_pipe = mojo::embedder::ChildProcessLaunched(process_handle);
2452 Send(new ChildProcessMsg_SetMojoParentPipeHandle(
2453 IPC::GetFileHandleForProcess(client_pipe, process_handle, true)));
2454 }
2455 #endif
2456
2446 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. 2457 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages.
2447 // This way, Mojo can be safely used from the renderer in response to any 2458 // This way, Mojo can be safely used from the renderer in response to any
2448 // Chrome IPC message. 2459 // Chrome IPC message.
2449 mojo_application_host_->Activate(this, GetHandle()); 2460 mojo_application_host_->Activate(this, GetHandle());
2450 2461
2451 while (!queued_messages_.empty()) { 2462 while (!queued_messages_.empty()) {
2452 Send(queued_messages_.front()); 2463 Send(queued_messages_.front());
2453 queued_messages_.pop(); 2464 queued_messages_.pop();
2454 } 2465 }
2455 2466
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2608 void RenderProcessHostImpl::GetAudioOutputControllers( 2619 void RenderProcessHostImpl::GetAudioOutputControllers(
2609 const GetAudioOutputControllersCallback& callback) const { 2620 const GetAudioOutputControllersCallback& callback) const {
2610 audio_renderer_host()->GetOutputControllers(callback); 2621 audio_renderer_host()->GetOutputControllers(callback);
2611 } 2622 }
2612 2623
2613 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2624 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2614 return bluetooth_dispatcher_host_.get(); 2625 return bluetooth_dispatcher_host_.get();
2615 } 2626 }
2616 2627
2617 } // namespace content 2628 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698