OLD | NEW |
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 "chrome/browser/nacl_host/nacl_process_host.h" | 5 #include "chrome/browser/nacl_host/nacl_process_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 // browser process. | 790 // browser process. |
791 ppapi_host_.reset(content::BrowserPpapiHost::CreateExternalPluginProcess( | 791 ppapi_host_.reset(content::BrowserPpapiHost::CreateExternalPluginProcess( |
792 ipc_proxy_channel_.get(), // sender | 792 ipc_proxy_channel_.get(), // sender |
793 permissions_, | 793 permissions_, |
794 process_->GetData().handle, | 794 process_->GetData().handle, |
795 ipc_proxy_channel_.get(), | 795 ipc_proxy_channel_.get(), |
796 nacl_host_message_filter_->render_process_id(), | 796 nacl_host_message_filter_->render_process_id(), |
797 render_view_id_, | 797 render_view_id_, |
798 profile_directory_)); | 798 profile_directory_)); |
799 | 799 |
| 800 ppapi_host_->SetOnIdleChangeCallback( |
| 801 nacl::NaClBrowser::GetDelegate()->GetOnIdleChangeCallback()); |
| 802 |
800 ppapi::PpapiNaClChannelArgs args; | 803 ppapi::PpapiNaClChannelArgs args; |
801 args.off_the_record = nacl_host_message_filter_->off_the_record(); | 804 args.off_the_record = nacl_host_message_filter_->off_the_record(); |
802 args.permissions = permissions_; | 805 args.permissions = permissions_; |
803 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 806 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
804 DCHECK(cmdline); | 807 DCHECK(cmdline); |
805 std::string flag_whitelist[] = {switches::kV, switches::kVModule}; | 808 std::string flag_whitelist[] = {switches::kV, switches::kVModule}; |
806 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { | 809 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { |
807 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); | 810 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); |
808 if (!value.empty()) { | 811 if (!value.empty()) { |
809 args.switch_names.push_back(flag_whitelist[i]); | 812 args.switch_names.push_back(flag_whitelist[i]); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 } else { | 1017 } else { |
1015 NaClStartDebugExceptionHandlerThread( | 1018 NaClStartDebugExceptionHandlerThread( |
1016 process_handle.Take(), info, | 1019 process_handle.Take(), info, |
1017 base::MessageLoopProxy::current(), | 1020 base::MessageLoopProxy::current(), |
1018 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1021 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1019 weak_factory_.GetWeakPtr())); | 1022 weak_factory_.GetWeakPtr())); |
1020 return true; | 1023 return true; |
1021 } | 1024 } |
1022 } | 1025 } |
1023 #endif | 1026 #endif |
OLD | NEW |