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> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/singleton.h" | 13 #include "base/singleton.h" |
14 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 14 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
15 #include "chrome/browser/extensions/extension_function.h" | 15 #include "chrome/browser/extensions/extension_function.h" |
16 #include "chrome/browser/shell_dialogs.h" | 16 #include "chrome/browser/shell_dialogs.h" |
| 17 #include "chrome/common/notification_observer.h" |
17 #include "chrome/common/notification_registrar.h" | 18 #include "chrome/common/notification_registrar.h" |
18 | 19 |
19 // Observes BookmarkModel and then routes the notifications as events to | 20 // Observes BookmarkModel and then routes the notifications as events to |
20 // the extension system. | 21 // the extension system. |
21 class ExtensionBookmarkEventRouter : public BookmarkModelObserver { | 22 class ExtensionBookmarkEventRouter : public BookmarkModelObserver { |
22 public: | 23 public: |
23 static ExtensionBookmarkEventRouter* GetSingleton(); | 24 static ExtensionBookmarkEventRouter* GetSingleton(); |
24 virtual ~ExtensionBookmarkEventRouter(); | 25 virtual ~ExtensionBookmarkEventRouter(); |
25 | 26 |
26 // Call this for each model to observe. Safe to call multiple times per | 27 // Call this for each model to observe. Safe to call multiple times per |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 public: | 198 public: |
198 // Override BookmarkManagerIOFunction. | 199 // Override BookmarkManagerIOFunction. |
199 bool RunImpl(); | 200 bool RunImpl(); |
200 void FileSelected(const FilePath& path, int index, void* params); | 201 void FileSelected(const FilePath& path, int index, void* params); |
201 | 202 |
202 private: | 203 private: |
203 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export"); | 204 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export"); |
204 }; | 205 }; |
205 | 206 |
206 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ | 207 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARKS_MODULE_H_ |
OLD | NEW |