OLD | NEW |
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 miscellaneous API functions, which don't belong to | 5 // This file provides miscellaneous API functions, which don't belong to |
6 // other files. | 6 // other files. |
7 | 7 |
8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
10 | 10 |
11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" | 11 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" |
12 #include "chrome/browser/chromeos/extensions/file_manager/zip_file_creator.h" | 12 #include "chrome/browser/chromeos/extensions/file_manager/zip_file_creator.h" |
13 | 13 |
14 namespace file_manager { | 14 namespace extensions { |
15 | 15 |
16 // Implements the chrome.fileBrowserPrivate.logoutUser method. | 16 // Implements the chrome.fileBrowserPrivate.logoutUser method. |
17 class LogoutUserFunction : public SyncExtensionFunction { | 17 class LogoutUserFunction : public SyncExtensionFunction { |
18 public: | 18 public: |
19 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.logoutUser", | 19 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.logoutUser", |
20 FILEBROWSERPRIVATE_LOGOUTUSER) | 20 FILEBROWSERPRIVATE_LOGOUTUSER) |
21 | 21 |
22 LogoutUserFunction(); | 22 LogoutUserFunction(); |
23 | 23 |
24 protected: | 24 protected: |
(...skipping 29 matching lines...) Expand all Loading... |
54 | 54 |
55 protected: | 55 protected: |
56 virtual ~SetPreferencesFunction(); | 56 virtual ~SetPreferencesFunction(); |
57 | 57 |
58 virtual bool RunImpl() OVERRIDE; | 58 virtual bool RunImpl() OVERRIDE; |
59 }; | 59 }; |
60 | 60 |
61 // Implements the chrome.fileBrowserPrivate.zipSelection method. | 61 // Implements the chrome.fileBrowserPrivate.zipSelection method. |
62 // Creates a zip file for the selected files. | 62 // Creates a zip file for the selected files. |
63 class ZipSelectionFunction : public LoggedAsyncExtensionFunction, | 63 class ZipSelectionFunction : public LoggedAsyncExtensionFunction, |
64 public ZipFileCreator::Observer { | 64 public file_manager::ZipFileCreator::Observer { |
65 public: | 65 public: |
66 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection", | 66 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection", |
67 FILEBROWSERPRIVATE_ZIPSELECTION) | 67 FILEBROWSERPRIVATE_ZIPSELECTION) |
68 | 68 |
69 ZipSelectionFunction(); | 69 ZipSelectionFunction(); |
70 | 70 |
71 protected: | 71 protected: |
72 virtual ~ZipSelectionFunction(); | 72 virtual ~ZipSelectionFunction(); |
73 | 73 |
74 // AsyncExtensionFunction overrides. | 74 // AsyncExtensionFunction overrides. |
75 virtual bool RunImpl() OVERRIDE; | 75 virtual bool RunImpl() OVERRIDE; |
76 | 76 |
77 // extensions::ZipFileCreator::Delegate overrides. | 77 // extensions::ZipFileCreator::Delegate overrides. |
78 virtual void OnZipDone(bool success) OVERRIDE; | 78 virtual void OnZipDone(bool success) OVERRIDE; |
79 | 79 |
80 private: | 80 private: |
81 scoped_refptr<ZipFileCreator> zip_file_creator_; | 81 scoped_refptr<file_manager::ZipFileCreator> zip_file_creator_; |
82 }; | 82 }; |
83 | 83 |
84 // Implements the chrome.fileBrowserPrivate.zoom method. | 84 // Implements the chrome.fileBrowserPrivate.zoom method. |
85 // Changes the zoom level of the file manager by internally calling | 85 // Changes the zoom level of the file manager by internally calling |
86 // RenderViewHost::Zoom(). TODO(hirono): Remove this function once the zoom | 86 // RenderViewHost::Zoom(). TODO(hirono): Remove this function once the zoom |
87 // level change is supported for all apps. crbug.com/227175. | 87 // level change is supported for all apps. crbug.com/227175. |
88 class ZoomFunction : public SyncExtensionFunction { | 88 class ZoomFunction : public SyncExtensionFunction { |
89 public: | 89 public: |
90 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zoom", | 90 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zoom", |
91 FILEBROWSERPRIVATE_ZOOM); | 91 FILEBROWSERPRIVATE_ZOOM); |
92 | 92 |
93 ZoomFunction(); | 93 ZoomFunction(); |
94 | 94 |
95 protected: | 95 protected: |
96 virtual ~ZoomFunction(); | 96 virtual ~ZoomFunction(); |
97 virtual bool RunImpl() OVERRIDE; | 97 virtual bool RunImpl() OVERRIDE; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace file_manager | 100 } // namespace extensions |
101 | 101 |
102 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ | 102 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ |
OLD | NEW |