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 "native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h" | 5 #include "native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h" |
6 | 6 |
7 #include "native_client/src/trusted/plugin/nacl_entry_points.h" | 7 #include "native_client/src/trusted/plugin/nacl_entry_points.h" |
8 | 8 |
9 LaunchNaClProcessFunc launch_nacl_process = NULL; | 9 LaunchNaClProcessFunc launch_nacl_process = NULL; |
10 | 10 |
11 namespace plugin { | 11 namespace plugin { |
12 | 12 |
13 bool SelLdrLauncherChrome::Start(const char* url) { | 13 bool SelLdrLauncherChrome::Start(const char* url) { |
14 return Start(0, url, false); | 14 return Start(0, url, true, false); |
15 } | 15 } |
16 | 16 |
17 bool SelLdrLauncherChrome::Start(PP_Instance instance, | 17 bool SelLdrLauncherChrome::Start(PP_Instance instance, |
18 const char* url, | 18 const char* url, |
| 19 bool uses_ppapi, |
19 bool enable_ppapi_dev) { | 20 bool enable_ppapi_dev) { |
20 if (!launch_nacl_process) | 21 if (!launch_nacl_process) |
21 return false; | 22 return false; |
22 // send a synchronous message to the browser process | 23 // send a synchronous message to the browser process |
23 // TODO(sehr): This is asserted to be one. Remove this parameter. | 24 // TODO(sehr): This is asserted to be one. Remove this parameter. |
24 static const int kNumberOfChannelsToBeCreated = 1; | 25 static const int kNumberOfChannelsToBeCreated = 1; |
25 if (launch_nacl_process(instance, | 26 if (launch_nacl_process(instance, |
26 url, | 27 url, |
| 28 PP_FromBool(uses_ppapi), |
27 PP_FromBool(enable_ppapi_dev), | 29 PP_FromBool(enable_ppapi_dev), |
28 kNumberOfChannelsToBeCreated, | 30 kNumberOfChannelsToBeCreated, |
29 &channel_) != PP_NACL_OK) { | 31 &channel_) != PP_NACL_OK) { |
30 return false; | 32 return false; |
31 } | 33 } |
32 return true; | 34 return true; |
33 } | 35 } |
34 | 36 |
35 } // namespace plugin | 37 } // namespace plugin |
OLD | NEW |