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 "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 render_view_id_, | 803 render_view_id_, |
804 profile_directory_)); | 804 profile_directory_)); |
805 ppapi_host_->SetOnKeepaliveCallback( | 805 ppapi_host_->SetOnKeepaliveCallback( |
806 NaClBrowser::GetDelegate()->GetOnKeepaliveCallback()); | 806 NaClBrowser::GetDelegate()->GetOnKeepaliveCallback()); |
807 | 807 |
808 ppapi::PpapiNaClChannelArgs args; | 808 ppapi::PpapiNaClChannelArgs args; |
809 args.off_the_record = nacl_host_message_filter_->off_the_record(); | 809 args.off_the_record = nacl_host_message_filter_->off_the_record(); |
810 args.permissions = permissions_; | 810 args.permissions = permissions_; |
811 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 811 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
812 DCHECK(cmdline); | 812 DCHECK(cmdline); |
813 std::string flag_whitelist[] = {switches::kV, switches::kVModule}; | 813 std::string flag_whitelist[] = { |
| 814 switches::kPpapiKeepAliveThrottle, |
| 815 switches::kV, |
| 816 switches::kVModule, |
| 817 }; |
814 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { | 818 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { |
815 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); | 819 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); |
816 if (!value.empty()) { | 820 if (!value.empty()) { |
817 args.switch_names.push_back(flag_whitelist[i]); | 821 args.switch_names.push_back(flag_whitelist[i]); |
818 args.switch_values.push_back(value); | 822 args.switch_values.push_back(value); |
819 } | 823 } |
820 } | 824 } |
821 | 825 |
822 ppapi_host_->GetPpapiHost()->AddHostFactoryFilter( | 826 ppapi_host_->GetPpapiHost()->AddHostFactoryFilter( |
823 scoped_ptr<ppapi::host::HostFactory>( | 827 scoped_ptr<ppapi::host::HostFactory>( |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 process_handle.Take(), info, | 1025 process_handle.Take(), info, |
1022 base::MessageLoopProxy::current(), | 1026 base::MessageLoopProxy::current(), |
1023 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1027 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1024 weak_factory_.GetWeakPtr())); | 1028 weak_factory_.GetWeakPtr())); |
1025 return true; | 1029 return true; |
1026 } | 1030 } |
1027 } | 1031 } |
1028 #endif | 1032 #endif |
1029 | 1033 |
1030 } // namespace nacl | 1034 } // namespace nacl |
OLD | NEW |