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

Unified Diff: chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h

Issue 2468673003: [Extensions] Remove ExtensionWebUI (Closed)
Patch Set: nit Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
index 932a1b82220131ee8d04d4dcf788f7d9eb9358e1..2a83d147603361f8bdcd11a6e485a5c7662801a4 100644
--- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
+++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h
@@ -16,6 +16,7 @@
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
#include "components/bookmarks/browser/bookmark_node_data.h"
#include "components/undo/bookmark_undo_service.h"
+#include "content/public/browser/web_contents_user_data.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/event_router.h"
@@ -93,12 +94,16 @@ class BookmarkManagerPrivateAPI : public BrowserContextKeyedAPI,
// Class that handles the drag and drop related chrome.bookmarkManagerPrivate
// events. This class has one instance per bookmark manager tab.
class BookmarkManagerPrivateDragEventRouter
- : public BookmarkTabHelper::BookmarkDrag {
+ : public BookmarkTabHelper::BookmarkDrag,
+ public content::WebContentsUserData<
+ BookmarkManagerPrivateDragEventRouter> {
public:
- BookmarkManagerPrivateDragEventRouter(Profile* profile,
- content::WebContents* web_contents);
+ explicit BookmarkManagerPrivateDragEventRouter(
+ content::WebContents* web_contents);
~BookmarkManagerPrivateDragEventRouter() override;
+ static void MaybeCreateForWebContents(content::WebContents* web_contents);
+
// BookmarkTabHelper::BookmarkDrag interface
void OnDragEnter(const bookmarks::BookmarkNodeData& data) override;
void OnDragOver(const bookmarks::BookmarkNodeData& data) override;
@@ -118,8 +123,8 @@ class BookmarkManagerPrivateDragEventRouter
const std::string& event_name,
std::unique_ptr<base::ListValue> args);
- Profile* profile_;
content::WebContents* web_contents_;
+ Profile* profile_;
bookmarks::BookmarkNodeData bookmark_drag_data_;
DISALLOW_COPY_AND_ASSIGN(BookmarkManagerPrivateDragEventRouter);

Powered by Google App Engine
This is Rietveld 408576698