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

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: small cleanup 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 #include "ipc/ipc_channel.h" 160 #include "ipc/ipc_channel.h"
161 #include "ipc/ipc_logging.h" 161 #include "ipc/ipc_logging.h"
162 #include "ipc/ipc_switches.h" 162 #include "ipc/ipc_switches.h"
163 #include "ipc/mojo/ipc_channel_mojo.h" 163 #include "ipc/mojo/ipc_channel_mojo.h"
164 #include "media/base/media_switches.h" 164 #include "media/base/media_switches.h"
165 #include "net/url_request/url_request_context_getter.h" 165 #include "net/url_request/url_request_context_getter.h"
166 #include "ppapi/shared_impl/ppapi_switches.h" 166 #include "ppapi/shared_impl/ppapi_switches.h"
167 #include "storage/browser/fileapi/sandbox_file_system_backend.h" 167 #include "storage/browser/fileapi/sandbox_file_system_backend.h"
168 #include "third_party/icu/source/common/unicode/unistr.h" 168 #include "third_party/icu/source/common/unicode/unistr.h"
169 #include "third_party/icu/source/i18n/unicode/timezone.h" 169 #include "third_party/icu/source/i18n/unicode/timezone.h"
170 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
170 #include "third_party/skia/include/core/SkBitmap.h" 171 #include "third_party/skia/include/core/SkBitmap.h"
171 #include "ui/base/ui_base_switches.h" 172 #include "ui/base/ui_base_switches.h"
172 #include "ui/events/event_switches.h" 173 #include "ui/events/event_switches.h"
173 #include "ui/gfx/switches.h" 174 #include "ui/gfx/switches.h"
174 #include "ui/gl/gl_switches.h" 175 #include "ui/gl/gl_switches.h"
175 #include "ui/gl/gpu_switching_manager.h" 176 #include "ui/gl/gpu_switching_manager.h"
176 #include "ui/native_theme/native_theme_switches.h" 177 #include "ui/native_theme/native_theme_switches.h"
177 178
178 #if defined(OS_ANDROID) 179 #if defined(OS_ANDROID)
179 #include "content/browser/android/child_process_launcher_android.h" 180 #include "content/browser/android/child_process_launcher_android.h"
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 // Send a handle that the external Mojo shell can use to pass an Application 2459 // Send a handle that the external Mojo shell can use to pass an Application
2459 // request to the child. 2460 // request to the child.
2460 RegisterChildWithExternalShell(id_, GetHandle(), this); 2461 RegisterChildWithExternalShell(id_, GetHandle(), this);
2461 #endif 2462 #endif
2462 2463
2463 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 2464 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841
2464 // is fixed. 2465 // is fixed.
2465 tracked_objects::ScopedTracker tracking_profile4( 2466 tracked_objects::ScopedTracker tracking_profile4(
2466 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2467 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2467 "465841 RenderProcessHostImpl::OnProcessLaunched::MojoActivate")); 2468 "465841 RenderProcessHostImpl::OnProcessLaunched::MojoActivate"));
2469
2470 #if defined(OS_WIN)
2471 if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk") &&
2472 child_process_launcher_.get()) {
2473 HANDLE process_handle = child_process_launcher_->GetProcess().Handle();
2474 HANDLE client_pipe = mojo::embedder::ChildProcessLaunched(process_handle);
2475 Send(new ChildProcessMsg_SetMojoParentPipeHandle(
2476 IPC::GetFileHandleForProcess(client_pipe, process_handle, true)));
2477 }
2478 #endif
2479
2468 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages. 2480 // Allow Mojo to be setup before the renderer sees any Chrome IPC messages.
2469 // This way, Mojo can be safely used from the renderer in response to any 2481 // This way, Mojo can be safely used from the renderer in response to any
2470 // Chrome IPC message. 2482 // Chrome IPC message.
2471 mojo_application_host_->Activate(this, GetHandle()); 2483 mojo_application_host_->Activate(this, GetHandle());
2472 2484
2473 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 2485 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841
2474 // is fixed. 2486 // is fixed.
2475 tracked_objects::ScopedTracker tracking_profile5( 2487 tracked_objects::ScopedTracker tracking_profile5(
2476 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2488 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2477 "465841 RenderProcessHostImpl::OnProcessLaunched::MojoClientLaunch")); 2489 "465841 RenderProcessHostImpl::OnProcessLaunched::MojoClientLaunch"));
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 void RenderProcessHostImpl::GetAudioOutputControllers( 2659 void RenderProcessHostImpl::GetAudioOutputControllers(
2648 const GetAudioOutputControllersCallback& callback) const { 2660 const GetAudioOutputControllersCallback& callback) const {
2649 audio_renderer_host()->GetOutputControllers(callback); 2661 audio_renderer_host()->GetOutputControllers(callback);
2650 } 2662 }
2651 2663
2652 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2664 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2653 return bluetooth_dispatcher_host_.get(); 2665 return bluetooth_dispatcher_host_.get();
2654 } 2666 }
2655 2667
2656 } // namespace content 2668 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698