| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 class BookmarksIOFunction : public BookmarksFunction, | 174 class BookmarksIOFunction : public BookmarksFunction, |
| 175 public SelectFileDialog::Listener { | 175 public SelectFileDialog::Listener { |
| 176 public: | 176 public: |
| 177 BookmarksIOFunction(); | 177 BookmarksIOFunction(); |
| 178 virtual ~BookmarksIOFunction(); | 178 virtual ~BookmarksIOFunction(); |
| 179 | 179 |
| 180 // Overridden from SelectFileDialog::Listener: | 180 // Overridden from SelectFileDialog::Listener: |
| 181 virtual void FileSelected(const FilePath& path, int index, void* params) = 0; | 181 virtual void FileSelected(const FilePath& path, int index, void* params) = 0; |
| 182 void MultiFilesSelected(const std::vector<FilePath>& files, void* params); | 182 virtual void MultiFilesSelected(const std::vector<FilePath>& files, |
| 183 void FileSelectionCanceled(void* params); | 183 void* params); |
| 184 virtual void FileSelectionCanceled(void* params); |
| 184 void SelectFile(SelectFileDialog::Type type); | 185 void SelectFile(SelectFileDialog::Type type); |
| 185 | 186 |
| 186 protected: | 187 protected: |
| 187 scoped_refptr<SelectFileDialog> select_file_dialog_; | 188 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 188 }; | 189 }; |
| 189 | 190 |
| 190 class ImportBookmarksFunction : public BookmarksIOFunction { | 191 class ImportBookmarksFunction : public BookmarksIOFunction { |
| 191 public: | 192 public: |
| 192 // Override BookmarkManagerIOFunction. | 193 // Override BookmarkManagerIOFunction. |
| 193 bool RunImpl(); | 194 virtual bool RunImpl(); |
| 194 void FileSelected(const FilePath& path, int index, void* params); | 195 virtual void FileSelected(const FilePath& path, int index, void* params); |
| 195 | 196 |
| 196 private: | 197 private: |
| 197 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.import"); | 198 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.import"); |
| 198 }; | 199 }; |
| 199 | 200 |
| 200 class ExportBookmarksFunction : public BookmarksIOFunction { | 201 class ExportBookmarksFunction : public BookmarksIOFunction { |
| 201 public: | 202 public: |
| 202 // Override BookmarkManagerIOFunction. | 203 // Override BookmarkManagerIOFunction. |
| 203 bool RunImpl(); | 204 virtual bool RunImpl(); |
| 204 void FileSelected(const FilePath& path, int index, void* params); | 205 virtual void FileSelected(const FilePath& path, int index, void* params); |
| 205 | 206 |
| 206 private: | 207 private: |
| 207 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export"); | 208 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export"); |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ | 211 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ |
| OLD | NEW |