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

Unified Diff: chrome/browser/bookmarks/bookmark_editor.h

Issue 99131: Create a bookmark editor dialog interface and implement a GTK version. (Closed)
Patch Set: fixes for tony Created 11 years, 8 months 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/bookmarks/bookmark_editor.h
diff --git a/chrome/browser/bookmarks/bookmark_editor.h b/chrome/browser/bookmarks/bookmark_editor.h
new file mode 100644
index 0000000000000000000000000000000000000000..5e356e13bd003aec6f839fbf0764146f584eba38
--- /dev/null
+++ b/chrome/browser/bookmarks/bookmark_editor.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_
+#define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_
+
+#include "base/gfx/native_widget_types.h"
+
+class BookmarkNode;
+class Profile;
+
+// Small, cross platform interface that shows the correct platform specific
+// bookmark editor dialog.
+class BookmarkEditor {
+ public:
+ // Handler is notified when the BookmarkEditor creates a new bookmark.
+ // Handler is owned by the BookmarkEditor and deleted when it is deleted.
+ class Handler {
+ public:
+ virtual ~Handler() {}
+ virtual void NodeCreated(BookmarkNode* new_node) = 0;
+ };
+
+ // An enumeration of the possible configurations offered.
+ enum Configuration {
+ SHOW_TREE,
+ NO_TREE
+ };
+
+ // Shows the platform specific BookmarkEditor subclass editing |node|. If
+ // |node| is NULL a new entry is created initially parented to |parent|. If
+ // |show_tree| is false the tree is not shown. BookmarkEditor takes
+ // ownership of |handler| and deletes it when done. |handler| may be
+ // null. See description of Handler for details.
+ static void Show(gfx::NativeWindow parent_window,
+ Profile* profile,
+ BookmarkNode* parent,
+ BookmarkNode* node,
+ Configuration configuration,
+ Handler* handler);
+};
+
+#endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EDITOR_H_

Powered by Google App Engine
This is Rietveld 408576698