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

Side by Side Diff: chrome/browser/nacl_host/pnacl_file_host.h

Issue 9158005: RFC: Add an interface for having the browser open a pnacl support file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a test, do some tweaks. Created 8 years, 9 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 #ifndef CHROME_BROWSER_NACL_HOST_PNACL_FILE_HOST_H_
6 #define CHROME_BROWSER_NACL_HOST_PNACL_FILE_HOST_H_
7 #pragma once
8
9 #include <string>
10 #include "base/platform_file.h"
11
12 class ChromeRenderMessageFilter;
13 class FilePath;
14
15 namespace IPC {
16 class Message;
17 } // namespace IPC
18
19 // Opens Pnacl Files in the Browser process, on behalf of the NaCl plugin.
20
21 namespace pnacl_file_host {
22
23 // Open a Pnacl file (readonly) on behalf of the NaCl plugin.
24 void GetReadonlyPnaclFd(ChromeRenderMessageFilter* chrome_render_message_filter,
25 const std::string& filename,
26 IPC::Message* reply_msg);
27
28 // Return true if the filename requested is valid for opening.
29 // Sets file_to_open to the FilePath which we will attempt to open.
30 bool PnaclCanOpenFile(const std::string& filename,
31 FilePath *file_to_open);
32
33 // Simply opens the file. Returns true on success.
34 // Exposed for testing.
35 bool PnaclDoOpenFile(const FilePath& file_to_open,
36 base::PlatformFile* out_file);
37
38
39 } // namespace pnacl_file_host
40
41 #endif // CHROME_BROWSER_NACL_HOST_PNACL_FILE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698