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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.cc

Issue 10266003: NaCl: Move sel_ldr_launcher_chrome.cc into the Chromium repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix namespace Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h"
6
7 #include "native_client/src/trusted/plugin/nacl_entry_points.h"
8
9 #if NACL_WINDOWS
10 # include <windows.h>
11 #endif
12
13 LaunchNaClProcessFunc launch_nacl_process = NULL;
14
15 namespace plugin {
16
17 bool SelLdrLauncherChrome::Start(const char* url) {
18 // send a synchronous message to the browser process
19 // TODO(mseaborn): Remove the nacl_proc_handle and nacl_proc_id
20 // arguments. Chromium is being changed not to give the renderer
21 // the Windows handle of the NaCl process.
22 nacl::Handle nacl_proc_handle;
23 int nacl_proc_id;
24 // TODO(sehr): This is asserted to be one. Remove this parameter.
25 static const int kNumberOfChannelsToBeCreated = 1;
26 if (!launch_nacl_process ||
27 !launch_nacl_process(url,
28 kNumberOfChannelsToBeCreated,
29 &channel_,
30 &nacl_proc_handle,
31 &nacl_proc_id)) {
32 return false;
33 }
34
35 #if NACL_WINDOWS
36 if (nacl_proc_handle != nacl::kInvalidHandle &&
37 nacl_proc_handle != NULL) {
38 CloseHandle(nacl_proc_handle);
39 }
40 #endif
41 return true;
42 }
43
44 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698