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

Unified Diff: content/renderer/pepper/pepper_file_ref_renderer_host.h

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 7 years, 3 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: content/renderer/pepper/pepper_file_ref_renderer_host.h
diff --git a/content/renderer/pepper/pepper_file_ref_renderer_host.h b/content/renderer/pepper/pepper_file_ref_renderer_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..13ee7637405d050ca3b769a7c57d039d556ed3c5
--- /dev/null
+++ b/content/renderer/pepper/pepper_file_ref_renderer_host.h
@@ -0,0 +1,62 @@
+// 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 CONTENT_RENDERER_PEPPER_PEPPER_FILE_REF_RENDERER_HOST_H_
+#define CONTENT_RENDERER_PEPPER_PEPPER_FILE_REF_RENDERER_HOST_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/files/file_path.h"
+#include "base/memory/weak_ptr.h"
+#include "content/public/renderer/renderer_ppapi_host.h"
+#include "content/renderer/pepper/pepper_file_system_host.h"
+#include "ipc/ipc_message.h"
+#include "ppapi/c/pp_file_info.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/host/host_message_context.h"
+#include "ppapi/host/resource_host.h"
+#include "url/gurl.h"
+
+namespace content {
+
+class PepperFileRefRendererHost
+ : public ppapi::host::ResourceHost {
+ public:
+ PepperFileRefRendererHost(RendererPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource,
+ PP_Resource file_system,
+ const std::string& internal_path);
+
+ PepperFileRefRendererHost(RendererPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource,
+ const base::FilePath& external_path);
+
+ virtual ~PepperFileRefRendererHost();
+
+ PP_FileSystemType GetFileSystemType() const;
+ GURL GetFileSystemURL() const;
+ base::FilePath GetExternalFilePath() const;
+
+ // ppapi::host::ResourceHost override.
+ virtual int32_t OnResourceMessageReceived(
+ const IPC::Message& msg,
+ ppapi::host::HostMessageContext* context) OVERRIDE;
+ virtual bool IsFileRefHost() OVERRIDE;
+
+ private:
+ PP_FileSystemType file_system_type_;
+ std::string internal_path_;
+ base::FilePath external_path_;
+ base::WeakPtr<PepperFileSystemHost> fs_host_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperFileRefRendererHost);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_PEPPER_PEPPER_FILE_REF_RENDERER_HOST_H_
« no previous file with comments | « content/renderer/pepper/pepper_file_io_host.cc ('k') | content/renderer/pepper/pepper_file_ref_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698