summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_utils.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 00:35:09 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 00:35:09 +0000
commit140aea057fa118579380f685f362f2533862b03f (patch)
tree627c15d8adda34f2c602589e0bac815bbdc7d4d9 /chrome/browser/bookmarks/bookmark_utils.h
parent57e3074163dc21bc3bc8cd37dc05f191532d836a (diff)
downloadchromium_src-140aea057fa118579380f685f362f2533862b03f.zip
chromium_src-140aea057fa118579380f685f362f2533862b03f.tar.gz
chromium_src-140aea057fa118579380f685f362f2533862b03f.tar.bz2
Port the folder selector portion of the BookmarkEditor to GTK.
Mirrors the BookmarkEditorView method, where the contents of BookmarkModel are copied to a temporary model so changes can be discarded if the user hits Cancel. In the GTK version, we copy not into another BookmarkModel, but into a GtkTreeStore, which serves as a model to the GtkTreeView on screen. Also ports the unit tests. http://crbug.com/11250 Review URL: http://codereview.chromium.org/99361 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_utils.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_utils.h b/chrome/browser/bookmarks/bookmark_utils.h
index 43966c0..81bdb84 100644
--- a/chrome/browser/bookmarks/bookmark_utils.h
+++ b/chrome/browser/bookmarks/bookmark_utils.h
@@ -9,6 +9,7 @@
#include "base/gfx/native_widget_types.h"
#include "chrome/browser/bookmarks/bookmark_drag_data.h"
+#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/history/snippet.h"
#include "webkit/glue/window_open_disposition.h"
@@ -142,6 +143,24 @@ void GetBookmarksContainingText(BookmarkModel* model,
// Returns true if |node|'s url or title contains the string |text|.
bool DoesBookmarkContainText(BookmarkNode* node, const std::wstring& text);
+// Modifies a bookmark node (assuming that there's no magic that needs to be
+// done regarding moving from one folder to another).
+void ApplyEditsWithNoGroupChange(BookmarkModel* model,
+ BookmarkNode* parent,
+ BookmarkNode* node,
+ const std::wstring& new_title,
+ const GURL& new_url,
+ BookmarkEditor::Handler* handler);
+
+// Modifies a bookmark node assuming that the parent of the node may have
+// changed and the node will need to be removed and reinserted.
+void ApplyEditsWithPossibleGroupChange(BookmarkModel* model,
+ BookmarkNode* new_parent,
+ BookmarkNode* node,
+ const std::wstring& new_title,
+ const GURL& new_url,
+ BookmarkEditor::Handler* handler);
+
// Toggles whether the bookmark bar is shown only on the new tab page or on
// all tabs. This is a preference modifier, not a visual modifier.
void ToggleWhenVisible(Profile* profile);