OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BOOKMARKS_BOOKMARK_MANAGER_EXTENSION_API_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_MANAGER_EXTENSION_API_H_ |
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MANAGER_EXTENSION_API_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_MANAGER_EXTENSION_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/bookmarks/bookmark_extension_api.h" | 9 #include "chrome/browser/bookmarks/bookmark_extension_api.h" |
10 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 10 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // The bookmark drag and drop data. This gets set after a drop was done on | 35 // The bookmark drag and drop data. This gets set after a drop was done on |
36 // the page. This returns NULL if no data is available. | 36 // the page. This returns NULL if no data is available. |
37 const BookmarkNodeData* GetBookmarkNodeData(); | 37 const BookmarkNodeData* GetBookmarkNodeData(); |
38 | 38 |
39 // Clears the drag and drop data. | 39 // Clears the drag and drop data. |
40 void ClearBookmarkNodeData(); | 40 void ClearBookmarkNodeData(); |
41 | 41 |
42 private: | 42 private: |
43 // Helper to actually dispatch an event to extension listeners. | 43 // Helper to actually dispatch an event to extension listeners. |
44 void DispatchEvent(const char* event_name, const base::ListValue* args); | 44 void DispatchEvent(const char* event_name, base::ListValue* args); |
45 | 45 |
46 void DispatchDragEvent(const BookmarkNodeData& data, const char* event_name); | 46 void DispatchDragEvent(const BookmarkNodeData& data, const char* event_name); |
47 | 47 |
48 Profile* profile_; | 48 Profile* profile_; |
49 TabContents* tab_; | 49 TabContents* tab_; |
50 BookmarkNodeData bookmark_drag_data_; | 50 BookmarkNodeData bookmark_drag_data_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(BookmarkManagerExtensionEventRouter); | 52 DISALLOW_COPY_AND_ASSIGN(BookmarkManagerExtensionEventRouter); |
53 }; | 53 }; |
54 | 54 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 protected: | 188 protected: |
189 virtual ~CanOpenNewWindowsBookmarkFunction() {} | 189 virtual ~CanOpenNewWindowsBookmarkFunction() {} |
190 | 190 |
191 // ExtensionFunction: | 191 // ExtensionFunction: |
192 virtual bool RunImpl() OVERRIDE; | 192 virtual bool RunImpl() OVERRIDE; |
193 }; | 193 }; |
194 | 194 |
195 | 195 |
196 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MANAGER_EXTENSION_API_H_ | 196 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MANAGER_EXTENSION_API_H_ |
OLD | NEW |