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

Side by Side Diff: content/browser/ppapi_plugin_process_host.cc

Issue 2365273004: Initial implementation for sharing field trial state (win) (Closed)
Patch Set: rebase + gclient sync Created 4 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/browser/ppapi_plugin_process_host.h" 5 #include "content/browser/ppapi_plugin_process_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 switches::kPpapiSubpixelRenderingSetting, 437 switches::kPpapiSubpixelRenderingSetting,
438 base::IntToString(font_params.subpixel_rendering)); 438 base::IntToString(font_params.subpixel_rendering));
439 #endif 439 #endif
440 440
441 if (!plugin_launcher.empty()) 441 if (!plugin_launcher.empty())
442 cmd_line->PrependWrapper(plugin_launcher); 442 cmd_line->PrependWrapper(plugin_launcher);
443 443
444 // On posix, never use the zygote for the broker. Also, only use the zygote if 444 // On posix, never use the zygote for the broker. Also, only use the zygote if
445 // we are not using a plugin launcher - having a plugin launcher means we need 445 // we are not using a plugin launcher - having a plugin launcher means we need
446 // to use another process instead of just forking the zygote. 446 // to use another process instead of just forking the zygote.
447 process_->Launch( 447 process_->Launch(new PpapiPluginSandboxedProcessLauncherDelegate(
448 new PpapiPluginSandboxedProcessLauncherDelegate(is_broker_, 448 is_broker_, process_->GetHost()),
449 process_->GetHost()), 449 cmd_line, nullptr, true);
450 cmd_line,
451 true);
452 return true; 450 return true;
453 } 451 }
454 452
455 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { 453 void PpapiPluginProcessHost::RequestPluginChannel(Client* client) {
456 base::ProcessHandle process_handle; 454 base::ProcessHandle process_handle;
457 int renderer_child_id; 455 int renderer_child_id;
458 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); 456 client->GetPpapiChannelInfo(&process_handle, &renderer_child_id);
459 457
460 base::ProcessId process_id = base::kNullProcessId; 458 base::ProcessId process_id = base::kNullProcessId;
461 if (process_handle != base::kNullProcessHandle) { 459 if (process_handle != base::kNullProcessHandle) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // sent_requests_ queue should be the one that the plugin just created. 546 // sent_requests_ queue should be the one that the plugin just created.
549 Client* client = sent_requests_.front(); 547 Client* client = sent_requests_.front();
550 sent_requests_.pop(); 548 sent_requests_.pop();
551 549
552 const ChildProcessData& data = process_->GetData(); 550 const ChildProcessData& data = process_->GetData();
553 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 551 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
554 data.id); 552 data.id);
555 } 553 }
556 554
557 } // namespace content 555 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698