OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "content/browser/browser_message_filter.h" | 10 #include "content/browser/browser_message_filter.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class FileUtilitiesMessageFilter : public BrowserMessageFilter { | 21 class FileUtilitiesMessageFilter : public BrowserMessageFilter { |
22 public: | 22 public: |
23 explicit FileUtilitiesMessageFilter(int process_id); | 23 explicit FileUtilitiesMessageFilter(int process_id); |
24 | 24 |
25 // BrowserMessageFilter implementation. | 25 // BrowserMessageFilter implementation. |
26 virtual void OverrideThreadForMessage(const IPC::Message& message, | 26 virtual void OverrideThreadForMessage(const IPC::Message& message, |
27 BrowserThread::ID* thread); | 27 BrowserThread::ID* thread); |
28 virtual bool OnMessageReceived(const IPC::Message& message, | 28 virtual bool OnMessageReceived(const IPC::Message& message, |
29 bool* message_was_ok); | 29 bool* message_was_ok); |
30 private: | 30 private: |
31 ~FileUtilitiesMessageFilter(); | 31 virtual ~FileUtilitiesMessageFilter(); |
32 | 32 |
33 typedef void (*FileInfoWriteFunc)(IPC::Message* reply_msg, | 33 typedef void (*FileInfoWriteFunc)(IPC::Message* reply_msg, |
34 const base::PlatformFileInfo& file_info); | 34 const base::PlatformFileInfo& file_info); |
35 | 35 |
36 void OnGetFileSize(const FilePath& path, int64* result); | 36 void OnGetFileSize(const FilePath& path, int64* result); |
37 void OnGetFileModificationTime(const FilePath& path, base::Time* result); | 37 void OnGetFileModificationTime(const FilePath& path, base::Time* result); |
38 void OnOpenFile(const FilePath& path, | 38 void OnOpenFile(const FilePath& path, |
39 int mode, | 39 int mode, |
40 IPC::PlatformFileForTransit* result); | 40 IPC::PlatformFileForTransit* result); |
41 | 41 |
42 // The ID of this process. | 42 // The ID of this process. |
43 int process_id_; | 43 int process_id_; |
44 | 44 |
45 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilitiesMessageFilter); | 45 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilitiesMessageFilter); |
46 }; | 46 }; |
47 | 47 |
48 #endif // CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ | 48 #endif // CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ |
OLD | NEW |