diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 19:32:15 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 19:32:15 +0000 |
commit | ef49de68beef6d5adf699518f8ef86f47b9f8b33 (patch) | |
tree | d325591020879e84a6bdea2433f1893a78ca75da /chrome/browser/bookmarks/bookmark_editor.h | |
parent | b938c4cd5adac79efc4453ccf1a53f9e70c29293 (diff) | |
download | chromium_src-ef49de68beef6d5adf699518f8ef86f47b9f8b33.zip chromium_src-ef49de68beef6d5adf699518f8ef86f47b9f8b33.tar.gz chromium_src-ef49de68beef6d5adf699518f8ef86f47b9f8b33.tar.bz2 |
Create a bookmark editor dialog interface and implement a GTK version.
The GTK version is currently limited to only editing the name/url of the
bookmark; I'm submitting this since it's getting big and I want a design
review.
Review URL: http://codereview.chromium.org/99131
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_editor.h')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_editor.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_editor.h b/chrome/browser/bookmarks/bookmark_editor.h new file mode 100644 index 0000000..5e356e1 --- /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_ |