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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <queue> | 11 #include <queue> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" | 16 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
17 #include "chrome/browser/extensions/extension_function.h" | 17 #include "chrome/browser/extensions/extension_function.h" |
18 #include "chrome/browser/prefs/pref_service.h" | 18 #include "chrome/browser/prefs/pref_service.h" |
19 #include "googleurl/src/url_util.h" | 19 #include "googleurl/src/url_util.h" |
20 | 20 |
21 class GURL; | 21 class GURL; |
22 | 22 |
23 namespace content { | 23 namespace ui { |
24 struct SelectedFileInfo; | 24 struct SelectedFileInfo; |
25 } | 25 } |
26 | 26 |
27 namespace gdata { | 27 namespace gdata { |
28 struct SearchResultInfo; | 28 struct SearchResultInfo; |
29 } | 29 } |
30 | 30 |
31 // Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method. | 31 // Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method. |
32 class RequestLocalFileSystemFunction : public AsyncExtensionFunction { | 32 class RequestLocalFileSystemFunction : public AsyncExtensionFunction { |
33 protected: | 33 protected: |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 }; | 133 }; |
134 | 134 |
135 // Parent class for the chromium extension APIs for the file dialog. | 135 // Parent class for the chromium extension APIs for the file dialog. |
136 class FileBrowserFunction | 136 class FileBrowserFunction |
137 : public AsyncExtensionFunction { | 137 : public AsyncExtensionFunction { |
138 public: | 138 public: |
139 FileBrowserFunction(); | 139 FileBrowserFunction(); |
140 | 140 |
141 protected: | 141 protected: |
142 typedef std::vector<GURL> UrlList; | 142 typedef std::vector<GURL> UrlList; |
143 typedef std::vector<content::SelectedFileInfo> SelectedFileInfoList; | 143 typedef std::vector<ui::SelectedFileInfo> SelectedFileInfoList; |
144 typedef base::Callback<void(const SelectedFileInfoList&)> | 144 typedef base::Callback<void(const SelectedFileInfoList&)> |
145 GetLocalPathsCallback; | 145 GetLocalPathsCallback; |
146 | 146 |
147 virtual ~FileBrowserFunction(); | 147 virtual ~FileBrowserFunction(); |
148 | 148 |
149 // Converts virtual paths to local paths by calling GetLocalPathsOnFileThread | 149 // Converts virtual paths to local paths by calling GetLocalPathsOnFileThread |
150 // on the file thread and call |callback| on the UI thread with the result. | 150 // on the file thread and call |callback| on the UI thread with the result. |
151 void GetLocalPathsOnFileThreadAndRunCallbackOnUIThread( | 151 void GetLocalPathsOnFileThreadAndRunCallbackOnUIThread( |
152 const UrlList& file_urls, | 152 const UrlList& file_urls, |
153 GetLocalPathsCallback callback); | 153 GetLocalPathsCallback callback); |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 // Implements the chrome.fileBrowserPrivate.requestDirectoryRefresh method. | 662 // Implements the chrome.fileBrowserPrivate.requestDirectoryRefresh method. |
663 class RequestDirectoryRefreshFunction : public SyncExtensionFunction { | 663 class RequestDirectoryRefreshFunction : public SyncExtensionFunction { |
664 protected: | 664 protected: |
665 virtual bool RunImpl() OVERRIDE; | 665 virtual bool RunImpl() OVERRIDE; |
666 private: | 666 private: |
667 DECLARE_EXTENSION_FUNCTION_NAME( | 667 DECLARE_EXTENSION_FUNCTION_NAME( |
668 "fileBrowserPrivate.requestDirectoryRefresh"); | 668 "fileBrowserPrivate.requestDirectoryRefresh"); |
669 }; | 669 }; |
670 | 670 |
671 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 671 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
OLD | NEW |