X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fextensions%2Fapi%2Fbookmarks%2Fbookmarks_api.h;h=c24a65d1810868e7ed16e408ebd051b361e14de0;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=32efbb85266634d5e3b43ad4c89172cd650323ef;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/src/chrome/browser/extensions/api/bookmarks/bookmarks_api.h index 32efbb8..c24a65d 100644 --- a/src/chrome/browser/extensions/api/bookmarks/bookmarks_api.h +++ b/src/chrome/browser/extensions/api/bookmarks/bookmarks_api.h @@ -42,36 +42,34 @@ struct CreateDetails; class BookmarkEventRouter : public BookmarkModelObserver { public: explicit BookmarkEventRouter(Profile* profile); - virtual ~BookmarkEventRouter(); + ~BookmarkEventRouter() override; // BookmarkModelObserver: - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) OVERRIDE; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE; - virtual void BookmarkNodeMoved(BookmarkModel* model, - const BookmarkNode* old_parent, - int old_index, - const BookmarkNode* new_parent, - int new_index) OVERRIDE; - virtual void BookmarkNodeAdded(BookmarkModel* model, - const BookmarkNode* parent, - int index) OVERRIDE; - virtual void BookmarkNodeRemoved(BookmarkModel* model, - const BookmarkNode* parent, - int old_index, - const BookmarkNode* node, - const std::set& removed_urls) OVERRIDE; - virtual void BookmarkAllUserNodesRemoved( - BookmarkModel* model, - const std::set& removed_urls) OVERRIDE; - virtual void BookmarkNodeChanged(BookmarkModel* model, - const BookmarkNode* node) OVERRIDE; - virtual void BookmarkNodeFaviconChanged(BookmarkModel* model, - const BookmarkNode* node) OVERRIDE; - virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, - const BookmarkNode* node) OVERRIDE; - virtual void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) OVERRIDE; - virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) OVERRIDE; + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void BookmarkNodeMoved(BookmarkModel* model, + const BookmarkNode* old_parent, + int old_index, + const BookmarkNode* new_parent, + int new_index) override; + void BookmarkNodeAdded(BookmarkModel* model, + const BookmarkNode* parent, + int index) override; + void BookmarkNodeRemoved(BookmarkModel* model, + const BookmarkNode* parent, + int old_index, + const BookmarkNode* node, + const std::set& removed_urls) override; + void BookmarkAllUserNodesRemoved(BookmarkModel* model, + const std::set& removed_urls) override; + void BookmarkNodeChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkNodeFaviconChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkNodeChildrenReordered(BookmarkModel* model, + const BookmarkNode* node) override; + void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) override; + void ExtensiveBookmarkChangesEnded(BookmarkModel* model) override; private: // Helper to actually dispatch an event to extension listeners. @@ -89,17 +87,16 @@ class BookmarksAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit BookmarksAPI(content::BrowserContext* context); - virtual ~BookmarksAPI(); + ~BookmarksAPI() override; // KeyedService implementation. - virtual void Shutdown() OVERRIDE; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded( - const EventListenerInfo& details) OVERRIDE; + void OnListenerAdded(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory; @@ -120,10 +117,10 @@ class BookmarksFunction : public ChromeAsyncExtensionFunction, public BaseBookmarkModelObserver { public: // AsyncExtensionFunction: - virtual bool RunAsync() OVERRIDE; + bool RunAsync() override; protected: - virtual ~BookmarksFunction() {} + ~BookmarksFunction() override {} // RunAsync semantic equivalent called when the bookmarks are ready. virtual bool RunOnReady() = 0; @@ -163,9 +160,10 @@ class BookmarksFunction : public ChromeAsyncExtensionFunction, private: // BaseBookmarkModelObserver: - virtual void BookmarkModelChanged() OVERRIDE; - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) OVERRIDE; + void BookmarkModelChanged() override; + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + + void RunAndSendResponse(); }; class BookmarksGetFunction : public BookmarksFunction { @@ -173,10 +171,10 @@ class BookmarksGetFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) protected: - virtual ~BookmarksGetFunction() {} + ~BookmarksGetFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksGetChildrenFunction : public BookmarksFunction { @@ -184,10 +182,10 @@ class BookmarksGetChildrenFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getChildren", BOOKMARKS_GETCHILDREN) protected: - virtual ~BookmarksGetChildrenFunction() {} + ~BookmarksGetChildrenFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksGetRecentFunction : public BookmarksFunction { @@ -195,10 +193,10 @@ class BookmarksGetRecentFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getRecent", BOOKMARKS_GETRECENT) protected: - virtual ~BookmarksGetRecentFunction() {} + ~BookmarksGetRecentFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksGetTreeFunction : public BookmarksFunction { @@ -206,10 +204,10 @@ class BookmarksGetTreeFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getTree", BOOKMARKS_GETTREE) protected: - virtual ~BookmarksGetTreeFunction() {} + ~BookmarksGetTreeFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksGetSubTreeFunction : public BookmarksFunction { @@ -217,10 +215,10 @@ class BookmarksGetSubTreeFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getSubTree", BOOKMARKS_GETSUBTREE) protected: - virtual ~BookmarksGetSubTreeFunction() {} + ~BookmarksGetSubTreeFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksSearchFunction : public BookmarksFunction { @@ -228,10 +226,10 @@ class BookmarksSearchFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.search", BOOKMARKS_SEARCH) protected: - virtual ~BookmarksSearchFunction() {} + ~BookmarksSearchFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksRemoveFunction : public BookmarksFunction { @@ -245,10 +243,10 @@ class BookmarksRemoveFunction : public BookmarksFunction { bool* invalid_id); protected: - virtual ~BookmarksRemoveFunction() {} + ~BookmarksRemoveFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksRemoveTreeFunction : public BookmarksRemoveFunction { @@ -256,7 +254,7 @@ class BookmarksRemoveTreeFunction : public BookmarksRemoveFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.removeTree", BOOKMARKS_REMOVETREE) protected: - virtual ~BookmarksRemoveTreeFunction() {} + ~BookmarksRemoveTreeFunction() override {} }; class BookmarksCreateFunction : public BookmarksFunction { @@ -264,10 +262,10 @@ class BookmarksCreateFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.create", BOOKMARKS_CREATE) protected: - virtual ~BookmarksCreateFunction() {} + ~BookmarksCreateFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksMoveFunction : public BookmarksFunction { @@ -279,10 +277,10 @@ class BookmarksMoveFunction : public BookmarksFunction { bool* invalid_id); protected: - virtual ~BookmarksMoveFunction() {} + ~BookmarksMoveFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksUpdateFunction : public BookmarksFunction { @@ -294,10 +292,10 @@ class BookmarksUpdateFunction : public BookmarksFunction { bool* invalid_id); protected: - virtual ~BookmarksUpdateFunction() {} + ~BookmarksUpdateFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksIOFunction : public BookmarksFunction, @@ -308,14 +306,14 @@ class BookmarksIOFunction : public BookmarksFunction, virtual void FileSelected(const base::FilePath& path, int index, void* params) = 0; // ui::SelectFileDialog::Listener: - virtual void MultiFilesSelected(const std::vector& files, - void* params) OVERRIDE; - virtual void FileSelectionCanceled(void* params) OVERRIDE; + void MultiFilesSelected(const std::vector& files, + void* params) override; + void FileSelectionCanceled(void* params) override; void SelectFile(ui::SelectFileDialog::Type type); protected: - virtual ~BookmarksIOFunction(); + ~BookmarksIOFunction() override; private: void ShowSelectFileDialog( @@ -331,15 +329,15 @@ class BookmarksImportFunction : public BookmarksIOFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.import", BOOKMARKS_IMPORT) // BookmarkManagerIOFunction: - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) OVERRIDE; + void FileSelected(const base::FilePath& path, + int index, + void* params) override; private: - virtual ~BookmarksImportFunction() {} + ~BookmarksImportFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; class BookmarksExportFunction : public BookmarksIOFunction { @@ -347,15 +345,15 @@ class BookmarksExportFunction : public BookmarksIOFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.export", BOOKMARKS_EXPORT) // BookmarkManagerIOFunction: - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) OVERRIDE; + void FileSelected(const base::FilePath& path, + int index, + void* params) override; private: - virtual ~BookmarksExportFunction() {} + ~BookmarksExportFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() OVERRIDE; + bool RunOnReady() override; }; } // namespace extensions