OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ |
| 7 |
| 8 #include "base/gfx/native_widget_types.h" |
| 9 |
| 10 class BookmarkNode; |
| 11 class Profile; |
| 12 |
| 13 // Small, cross platform interface that shows the correct platform specific |
| 14 // bookmark editor dialog. |
| 15 class BookmarkEditor { |
| 16 public: |
| 17 // Handler is notified when the BookmarkEditor creates a new bookmark. |
| 18 // Handler is owned by the BookmarkEditor and deleted when it is deleted. |
| 19 class Handler { |
| 20 public: |
| 21 virtual ~Handler() {} |
| 22 virtual void NodeCreated(BookmarkNode* new_node) = 0; |
| 23 }; |
| 24 |
| 25 // An enumeration of the possible configurations offered. |
| 26 enum Configuration { |
| 27 SHOW_TREE, |
| 28 NO_TREE |
| 29 }; |
| 30 |
| 31 // Shows the platform specific BookmarkEditor subclass editing |node|. If |
| 32 // |node| is NULL a new entry is created initially parented to |parent|. If |
| 33 // |show_tree| is false the tree is not shown. BookmarkEditor takes |
| 34 // ownership of |handler| and deletes it when done. |handler| may be |
| 35 // null. See description of Handler for details. |
| 36 static void Show(gfx::NativeWindow parent_window, |
| 37 Profile* profile, |
| 38 BookmarkNode* parent, |
| 39 BookmarkNode* node, |
| 40 Configuration configuration, |
| 41 Handler* handler); |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_ |
OLD | NEW |