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

Unified Diff: chrome/browser/renderer_host/file_utilities_dispatcher_host.h

Issue 3660003: Support file utilities and mime-related methods on workers. (Closed)
Patch Set: rebase Created 10 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/file_utilities_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/file_utilities_dispatcher_host.h
diff --git a/chrome/browser/renderer_host/file_utilities_dispatcher_host.h b/chrome/browser/renderer_host/file_utilities_dispatcher_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e8972a7f4957a20f2bbf527660f01113c2f71a2
--- /dev/null
+++ b/chrome/browser/renderer_host/file_utilities_dispatcher_host.h
@@ -0,0 +1,63 @@
+// Copyright (c) 2010 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_FILE_UTILITIES_DISPATCHER_HOST_H_
+#define CHROME_BROWSER_RENDERER_HOST_FILE_UTILITIES_DISPATCHER_HOST_H_
+
+#include "base/basictypes.h"
+#include "base/file_path.h"
+#include "base/process.h"
+#include "base/ref_counted.h"
+#include "ipc/ipc_message.h"
+
+namespace base {
+struct PlatformFileInfo;
+}
+
+namespace IPC {
+class Message;
+}
+
+class FileUtilitiesDispatcherHost
+ : public base::RefCountedThreadSafe<FileUtilitiesDispatcherHost> {
+ public:
+ FileUtilitiesDispatcherHost(IPC::Message::Sender* sender, int process_id);
+ void Init(base::ProcessHandle process_handle);
+ void Shutdown();
+ bool OnMessageReceived(const IPC::Message& message, bool* msg_is_ok);
+
+ void Send(IPC::Message* message);
+
+ private:
+ friend class base::RefCountedThreadSafe<FileUtilitiesDispatcherHost>;
+ ~FileUtilitiesDispatcherHost();
+
+ typedef void (*FileInfoWriteFunc)(IPC::Message* reply_msg,
+ const base::PlatformFileInfo& file_info);
+
+ void OnGetFileSize(const FilePath& path, IPC::Message* reply_msg);
+ void OnGetFileModificationTime(const FilePath& path, IPC::Message* reply_msg);
+ void OnGetFileInfoOnFileThread(const FilePath& path,
+ IPC::Message* reply_msg,
+ FileInfoWriteFunc write_func);
+ void OnOpenFile(const FilePath& path, int mode,IPC::Message* reply_msg);
+ void OnOpenFileOnFileThread(const FilePath& path,
+ int mode,
+ IPC::Message* reply_msg);
+
+ // The sender to be used for sending out IPC messages.
+ IPC::Message::Sender* message_sender_;
+
+ // The ID of this process.
+ int process_id_;
+
+ // The handle of this process.
+ base::ProcessHandle process_handle_;
+
+ bool shutdown_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilitiesDispatcherHost);
+};
+
+#endif // CHROME_BROWSER_RENDERER_HOST_FILE_UTILITIES_DISPATCHER_HOST_H_
« no previous file with comments | « no previous file | chrome/browser/renderer_host/file_utilities_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698