summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_bubble_view.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-15 18:07:06 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-15 18:07:06 +0000
commitc74369a5288264e52355a940121cb09cebc633b5 (patch)
tree231f742ba9ad7c68e6d3c035100157da4d556072 /chrome/browser/views/bookmark_bubble_view.h
parent43448f9b2f1bad7df5dc408888322b639129142e (diff)
downloadchromium_src-c74369a5288264e52355a940121cb09cebc633b5.zip
chromium_src-c74369a5288264e52355a940121cb09cebc633b5.tar.gz
chromium_src-c74369a5288264e52355a940121cb09cebc633b5.tar.bz2
Changes the bookmark bubble to have the following logic:
. We only apply edits when the bubble is closed (previously selecting a different folder resulted in an immediate action). . Hitting escape cancels any edits. . When the bubble is shown for newly bookmarked items hitting escape removes the bookmark. . If you click 'Edit...' or select 'Choose another folder...' any edits are applied immediately before the editor is shown. BUG=5015 TEST=thorougly test the bookmark bubble to make sure I haven't broken anything. Review URL: http://codereview.chromium.org/14074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bubble_view.h')
-rw-r--r--chrome/browser/views/bookmark_bubble_view.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/chrome/browser/views/bookmark_bubble_view.h b/chrome/browser/views/bookmark_bubble_view.h
index 0e5cefe..c067f4a 100644
--- a/chrome/browser/views/bookmark_bubble_view.h
+++ b/chrome/browser/views/bookmark_bubble_view.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H__
-#define CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H__
+#ifndef CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H_
+#define CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H_
#include "base/gfx/rect.h"
#include "chrome/browser/views/info_bubble.h"
@@ -77,7 +77,7 @@ class BookmarkBubbleView : public views::View,
std::vector<BookmarkNode*> nodes_;
int node_parent_index_;
- DISALLOW_EVIL_CONSTRUCTORS(RecentlyUsedFoldersModel);
+ DISALLOW_COPY_AND_ASSIGN(RecentlyUsedFoldersModel);
};
// Creates a BookmarkBubbleView.
@@ -108,20 +108,18 @@ class BookmarkBubbleView : public views::View,
// InfoBubbleDelegate methods. These forward to the InfoBubbleDelegate
// supplied in the constructor as well as sending out the necessary
// notification.
- virtual void InfoBubbleClosing(InfoBubble* info_bubble);
+ virtual void InfoBubbleClosing(InfoBubble* info_bubble,
+ bool closed_by_escape);
virtual bool CloseOnEscape();
// Closes the bubble.
void Close();
- // Removes the bookmark and closes the view.
- void RemoveBookmark();
-
// Shows the BookmarkEditor.
void ShowEditor();
- // Sets the title of the bookmark from the editor
- void SetNodeTitleFromTextField();
+ // Sets the title and parent of the node.
+ void ApplyEdits();
// Delegate for the bubble, may be null.
InfoBubbleDelegate* delegate_;
@@ -157,8 +155,13 @@ class BookmarkBubbleView : public views::View,
// the current parent.
views::ComboBox* parent_combobox_;
- DISALLOW_EVIL_CONSTRUCTORS(BookmarkBubbleView);
-};
+ // When the destructor is invoked should the bookmark be removed?
+ bool remove_bookmark_;
-#endif // CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H__
+ // When the destructor is invoked should edits be applied?
+ bool apply_edits_;
+
+ DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleView);
+};
+#endif // CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H_