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

Side by Side Diff: components/nacl/browser/nacl_process_host.cc

Issue 104673003: Pepper: Send dev/canary channel status to plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE build fix Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 18 matching lines...) Expand all
29 #include "components/nacl/browser/nacl_browser.h" 29 #include "components/nacl/browser/nacl_browser.h"
30 #include "components/nacl/browser/nacl_host_message_filter.h" 30 #include "components/nacl/browser/nacl_host_message_filter.h"
31 #include "components/nacl/common/nacl_cmd_line.h" 31 #include "components/nacl/common/nacl_cmd_line.h"
32 #include "components/nacl/common/nacl_host_messages.h" 32 #include "components/nacl/common/nacl_host_messages.h"
33 #include "components/nacl/common/nacl_messages.h" 33 #include "components/nacl/common/nacl_messages.h"
34 #include "components/nacl/common/nacl_process_type.h" 34 #include "components/nacl/common/nacl_process_type.h"
35 #include "components/nacl/common/nacl_switches.h" 35 #include "components/nacl/common/nacl_switches.h"
36 #include "content/public/browser/browser_child_process_host.h" 36 #include "content/public/browser/browser_child_process_host.h"
37 #include "content/public/browser/browser_ppapi_host.h" 37 #include "content/public/browser/browser_ppapi_host.h"
38 #include "content/public/browser/child_process_data.h" 38 #include "content/public/browser/child_process_data.h"
39 #include "content/public/browser/plugin_service.h"
39 #include "content/public/common/child_process_host.h" 40 #include "content/public/common/child_process_host.h"
40 #include "content/public/common/content_switches.h" 41 #include "content/public/common/content_switches.h"
41 #include "content/public/common/process_type.h" 42 #include "content/public/common/process_type.h"
42 #include "ipc/ipc_channel.h" 43 #include "ipc/ipc_channel.h"
43 #include "ipc/ipc_switches.h" 44 #include "ipc/ipc_switches.h"
44 #include "native_client/src/shared/imc/nacl_imc_c.h" 45 #include "native_client/src/shared/imc/nacl_imc_c.h"
45 #include "net/base/net_util.h" 46 #include "net/base/net_util.h"
46 #include "net/socket/tcp_listen_socket.h" 47 #include "net/socket/tcp_listen_socket.h"
47 #include "ppapi/host/host_factory.h" 48 #include "ppapi/host/host_factory.h"
48 #include "ppapi/host/ppapi_host.h" 49 #include "ppapi/host/ppapi_host.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 permissions_, 796 permissions_,
796 process_->GetData().handle, 797 process_->GetData().handle,
797 ipc_proxy_channel_.get(), 798 ipc_proxy_channel_.get(),
798 nacl_host_message_filter_->render_process_id(), 799 nacl_host_message_filter_->render_process_id(),
799 render_view_id_, 800 render_view_id_,
800 profile_directory_)); 801 profile_directory_));
801 802
802 ppapi::PpapiNaClChannelArgs args; 803 ppapi::PpapiNaClChannelArgs args;
803 args.off_the_record = nacl_host_message_filter_->off_the_record(); 804 args.off_the_record = nacl_host_message_filter_->off_the_record();
804 args.permissions = permissions_; 805 args.permissions = permissions_;
806 args.supports_dev_channel =
807 content::PluginService::GetInstance()->PpapiDevChannelSupported();
805 CommandLine* cmdline = CommandLine::ForCurrentProcess(); 808 CommandLine* cmdline = CommandLine::ForCurrentProcess();
806 DCHECK(cmdline); 809 DCHECK(cmdline);
807 std::string flag_whitelist[] = {switches::kV, switches::kVModule}; 810 std::string flag_whitelist[] = {switches::kV, switches::kVModule};
808 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) { 811 for (size_t i = 0; i < arraysize(flag_whitelist); ++i) {
809 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]); 812 std::string value = cmdline->GetSwitchValueASCII(flag_whitelist[i]);
810 if (!value.empty()) { 813 if (!value.empty()) {
811 args.switch_names.push_back(flag_whitelist[i]); 814 args.switch_names.push_back(flag_whitelist[i]);
812 args.switch_values.push_back(value); 815 args.switch_values.push_back(value);
813 } 816 }
814 } 817 }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 process_handle.Take(), info, 1018 process_handle.Take(), info,
1016 base::MessageLoopProxy::current(), 1019 base::MessageLoopProxy::current(),
1017 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, 1020 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker,
1018 weak_factory_.GetWeakPtr())); 1021 weak_factory_.GetWeakPtr()));
1019 return true; 1022 return true;
1020 } 1023 }
1021 } 1024 }
1022 #endif 1025 #endif
1023 1026
1024 } // namespace nacl 1027 } // namespace nacl
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/browser/plugin_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698