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

Unified Diff: chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h

Issue 14188019: CRX FileSystem Pepper private API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h
diff --git a/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..53669e15c076f211bd83980a2a0cd4601a6877d6
--- /dev/null
+++ b/chrome/browser/renderer_host/pepper/pepper_crx_file_system_message_filter.h
@@ -0,0 +1,67 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_
+
+#include <string>
+
+#include "base/files/file_path.h"
+#include "googleurl/src/gurl.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/host/resource_host.h"
+#include "ppapi/host/resource_message_filter.h"
+
+namespace content {
+class BrowserPpapiHost;
+}
+
+namespace ppapi {
+namespace host {
+struct HostMessageContext;
+} // namespace host
+} // namespace ppapi
+
+namespace chrome {
+
+class PepperCrxFileSystemMessageFilter
+ : public ppapi::host::ResourceMessageFilter {
+ public:
+ static PepperCrxFileSystemMessageFilter* Create(
+ PP_Instance instance,
+ content::BrowserPpapiHost* host);
+
+ // ppapi::host::ResourceMessageFilter implementation.
+ virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(
+ const IPC::Message& msg) OVERRIDE;
+ virtual int32_t OnResourceMessageReceived(
+ const IPC::Message& msg,
+ ppapi::host::HostMessageContext* context) OVERRIDE;
+
+ private:
+ PepperCrxFileSystemMessageFilter(
+ int render_process_id,
+ const base::FilePath& profile_directory,
+ const GURL& document_url);
+
+ virtual ~PepperCrxFileSystemMessageFilter();
+
+ // Returns filesystem id of isolated filesystem if valid, or empty string
+ // otherwise. This must run on the UI thread because ProfileManager only
+ // allows access on that thread.
+ std::string CreateIsolatedFileSystem();
+
+ int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context);
+
+ const int render_process_id_;
+ const base::FilePath& profile_directory_;
+ const GURL document_url_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperCrxFileSystemMessageFilter);
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698