OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBFILEUTILITIES_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEBFILEUTILITIES_IMPL_H_ |
6 #define WEBFILEUTILITIES_IMPL_H_ | 6 #define CONTENT_CHILD_WEBFILEUTILITIES_IMPL_H_ |
7 | 7 |
8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
| 9 #include "content/common/content_export.h" |
9 #include "third_party/WebKit/public/platform/WebFileInfo.h" | 10 #include "third_party/WebKit/public/platform/WebFileInfo.h" |
10 #include "third_party/WebKit/public/platform/WebFileUtilities.h" | 11 #include "third_party/WebKit/public/platform/WebFileUtilities.h" |
11 #include "webkit/glue/webkit_glue_export.h" | |
12 | 12 |
13 namespace webkit_glue { | 13 namespace content { |
14 | 14 |
15 class WEBKIT_GLUE_EXPORT WebFileUtilitiesImpl : | 15 class CONTENT_EXPORT WebFileUtilitiesImpl |
16 NON_EXPORTED_BASE(public blink::WebFileUtilities) { | 16 : NON_EXPORTED_BASE(public blink::WebFileUtilities) { |
17 public: | 17 public: |
18 WebFileUtilitiesImpl(); | 18 WebFileUtilitiesImpl(); |
19 virtual ~WebFileUtilitiesImpl(); | 19 virtual ~WebFileUtilitiesImpl(); |
20 | 20 |
21 // WebFileUtilities methods: | 21 // WebFileUtilities methods: |
22 virtual bool getFileInfo( | 22 virtual bool getFileInfo(const blink::WebString& path, |
23 const blink::WebString& path, | 23 blink::WebFileInfo& result); |
24 blink::WebFileInfo& result); | |
25 virtual blink::WebString directoryName(const blink::WebString& path); | 24 virtual blink::WebString directoryName(const blink::WebString& path); |
26 virtual blink::WebString baseName(const blink::WebString& path); | 25 virtual blink::WebString baseName(const blink::WebString& path); |
27 virtual blink::WebURL filePathToURL(const blink::WebString& path); | 26 virtual blink::WebURL filePathToURL(const blink::WebString& path); |
28 virtual base::PlatformFile openFile(const blink::WebString& path, int mode); | 27 virtual base::PlatformFile openFile(const blink::WebString& path, int mode); |
29 virtual void closeFile(base::PlatformFile& handle); | 28 virtual void closeFile(base::PlatformFile& handle); |
30 virtual int readFromFile(base::PlatformFile handle, char* data, int length); | 29 virtual int readFromFile(base::PlatformFile handle, char* data, int length); |
31 | 30 |
32 void set_sandbox_enabled(bool sandbox_enabled) { | 31 void set_sandbox_enabled(bool sandbox_enabled) { |
33 sandbox_enabled_ = sandbox_enabled; | 32 sandbox_enabled_ = sandbox_enabled; |
34 } | 33 } |
35 | 34 |
36 protected: | 35 protected: |
37 bool sandbox_enabled_; | 36 bool sandbox_enabled_; |
38 }; | 37 }; |
39 | 38 |
40 } // namespace webkit_glue | 39 } // namespace content |
41 | 40 |
42 #endif // WEBFILEUTILITIES_IMPL_H_ | 41 #endif // CONTENT_CHILD_WEBFILEUTILITIES_IMPL_H_ |
OLD | NEW |