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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_dialog.h

Issue 23581006: Reland 220012: Move the functions of filebrowserPrivateApi from the file_manager namespace to the e… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file provides API functions for the file manager to act as the file 5 // This file provides API functions for the file manager to act as the file
6 // dialog for opening and saving files. 6 // dialog for opening and saving files.
7 7
8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DIALOG_H_ 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DIALOG_H_
9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DIALOG_H_ 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DIALOG_H_
10 10
11 #include <vector> 11 #include <vector>
12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" 12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
13 13
14 namespace ui { 14 namespace ui {
15 struct SelectedFileInfo; 15 struct SelectedFileInfo;
16 } 16 }
17 17
18 namespace file_manager { 18 namespace extensions {
19 19
20 // Cancel file selection Dialog. Closes the dialog window. 20 // Cancel file selection Dialog. Closes the dialog window.
21 class CancelFileDialogFunction : public LoggedAsyncExtensionFunction { 21 class CancelFileDialogFunction
22 : public file_manager::LoggedAsyncExtensionFunction {
satorux1 2013/08/29 03:34:42 why not moving LoggedAsyncExtensionFunction to ext
hirono 2013/08/29 03:41:59 Because the extensions namespace is referred by ma
satorux1 2013/08/29 03:50:00 I guess we don't have to worry about the namespace
hirono 2013/08/29 06:24:32 Done.
22 public: 23 public:
23 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.cancelDialog", 24 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.cancelDialog",
24 FILEBROWSERPRIVATE_CANCELDIALOG) 25 FILEBROWSERPRIVATE_CANCELDIALOG)
25 26
26 CancelFileDialogFunction(); 27 CancelFileDialogFunction();
27 28
28 protected: 29 protected:
29 virtual ~CancelFileDialogFunction(); 30 virtual ~CancelFileDialogFunction();
30 31
31 // AsyncExtensionFunction overrides. 32 // AsyncExtensionFunction overrides.
32 virtual bool RunImpl() OVERRIDE; 33 virtual bool RunImpl() OVERRIDE;
33 }; 34 };
34 35
35 class SelectFileFunction : public LoggedAsyncExtensionFunction { 36 class SelectFileFunction : public file_manager::LoggedAsyncExtensionFunction {
36 public: 37 public:
37 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFile", 38 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFile",
38 FILEBROWSERPRIVATE_SELECTFILE) 39 FILEBROWSERPRIVATE_SELECTFILE)
39 40
40 SelectFileFunction(); 41 SelectFileFunction();
41 42
42 protected: 43 protected:
43 virtual ~SelectFileFunction(); 44 virtual ~SelectFileFunction();
44 45
45 // AsyncExtensionFunction overrides. 46 // AsyncExtensionFunction overrides.
46 virtual bool RunImpl() OVERRIDE; 47 virtual bool RunImpl() OVERRIDE;
47 48
48 private: 49 private:
49 // A callback method to handle the result of GetSelectedFileInfo. 50 // A callback method to handle the result of GetSelectedFileInfo.
50 void GetSelectedFileInfoResponse( 51 void GetSelectedFileInfoResponse(
51 const std::vector<ui::SelectedFileInfo>& files); 52 const std::vector<ui::SelectedFileInfo>& files);
52 }; 53 };
53 54
54 // Select multiple files. Closes the dialog window. 55 // Select multiple files. Closes the dialog window.
55 class SelectFilesFunction : public LoggedAsyncExtensionFunction { 56 class SelectFilesFunction : public file_manager::LoggedAsyncExtensionFunction {
56 public: 57 public:
57 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFiles", 58 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.selectFiles",
58 FILEBROWSERPRIVATE_SELECTFILES) 59 FILEBROWSERPRIVATE_SELECTFILES)
59 60
60 SelectFilesFunction(); 61 SelectFilesFunction();
61 62
62 protected: 63 protected:
63 virtual ~SelectFilesFunction(); 64 virtual ~SelectFilesFunction();
64 65
65 // AsyncExtensionFunction overrides. 66 // AsyncExtensionFunction overrides.
66 virtual bool RunImpl() OVERRIDE; 67 virtual bool RunImpl() OVERRIDE;
67 68
68 private: 69 private:
69 // A callback method to handle the result of GetSelectedFileInfo. 70 // A callback method to handle the result of GetSelectedFileInfo.
70 void GetSelectedFileInfoResponse( 71 void GetSelectedFileInfoResponse(
71 const std::vector<ui::SelectedFileInfo>& files); 72 const std::vector<ui::SelectedFileInfo>& files);
72 }; 73 };
73 74
74 } // namespace file_manager 75 } // namespace extensions
75 76
76 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DIALOG_H_ 77 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698