OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PEPPER_FILE_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_FILE_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_FILE_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_FILE_MESSAGE_FILTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 // A message filter for Pepper-specific File I/O messages. | 31 // A message filter for Pepper-specific File I/O messages. |
32 class PepperFileMessageFilter : public BrowserMessageFilter { | 32 class PepperFileMessageFilter : public BrowserMessageFilter { |
33 public: | 33 public: |
34 PepperFileMessageFilter(int child_id, | 34 PepperFileMessageFilter(int child_id, |
35 content::BrowserContext* browser_context); | 35 content::BrowserContext* browser_context); |
36 | 36 |
37 // BrowserMessageFilter methods: | 37 // BrowserMessageFilter methods: |
38 virtual void OverrideThreadForMessage(const IPC::Message& message, | 38 virtual void OverrideThreadForMessage(const IPC::Message& message, |
39 BrowserThread::ID* thread); | 39 content::BrowserThread::ID* thread); |
40 virtual bool OnMessageReceived(const IPC::Message& message, | 40 virtual bool OnMessageReceived(const IPC::Message& message, |
41 bool* message_was_ok); | 41 bool* message_was_ok); |
42 virtual void OnDestruct() const; | 42 virtual void OnDestruct() const; |
43 | 43 |
44 int child_id() const { return child_id_; } | 44 int child_id() const { return child_id_; } |
45 | 45 |
46 private: | 46 private: |
47 friend class BrowserThread; | 47 friend class content::BrowserThread; |
48 friend class DeleteTask<PepperFileMessageFilter>; | 48 friend class DeleteTask<PepperFileMessageFilter>; |
49 virtual ~PepperFileMessageFilter(); | 49 virtual ~PepperFileMessageFilter(); |
50 | 50 |
51 // Called on the FILE thread: | 51 // Called on the FILE thread: |
52 void OnOpenFile(const webkit::ppapi::PepperFilePath& path, | 52 void OnOpenFile(const webkit::ppapi::PepperFilePath& path, |
53 int flags, | 53 int flags, |
54 base::PlatformFileError* error, | 54 base::PlatformFileError* error, |
55 IPC::PlatformFileForTransit* file); | 55 IPC::PlatformFileForTransit* file); |
56 void OnRenameFile(const webkit::ppapi::PepperFilePath& from_path, | 56 void OnRenameFile(const webkit::ppapi::PepperFilePath& from_path, |
57 const webkit::ppapi::PepperFilePath& to_path, | 57 const webkit::ppapi::PepperFilePath& to_path, |
(...skipping 22 matching lines...) Expand all Loading... |
80 // owned by this class. | 80 // owned by this class. |
81 IPC::Channel* channel_; | 81 IPC::Channel* channel_; |
82 | 82 |
83 // The base path for the pepper data. | 83 // The base path for the pepper data. |
84 FilePath pepper_path_; | 84 FilePath pepper_path_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(PepperFileMessageFilter); | 86 DISALLOW_COPY_AND_ASSIGN(PepperFileMessageFilter); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_FILE_MESSAGE_FILTER_H_ | 89 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_FILE_MESSAGE_FILTER_H_ |
OLD | NEW |