summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/info_bubble.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/info_bubble.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/info_bubble.h')
-rw-r--r--chrome/browser/views/info_bubble.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h
index 21a4e2d..4e918425 100644
--- a/chrome/browser/views/info_bubble.h
+++ b/chrome/browser/views/info_bubble.h
@@ -26,7 +26,10 @@ class Window;
class InfoBubbleDelegate {
public:
// Called when the InfoBubble is closing and is about to be deleted.
- virtual void InfoBubbleClosing(InfoBubble* info_bubble) = 0;
+ // |closed_by_escape| is true if the close is the result of the user pressing
+ // escape.
+ virtual void InfoBubbleClosing(InfoBubble* info_bubble,
+ bool closed_by_escape) = 0;
// Whether the InfoBubble should be closed when the Esc key is pressed.
virtual bool CloseOnEscape() = 0;
@@ -148,6 +151,10 @@ class InfoBubble : public views::WidgetWin,
virtual ContentView* CreateContentView(views::View* content);
private:
+ // Closes the window notifying the delegate. |closed_by_escape| is true if
+ // the close is the result of pressing escape.
+ void Close(bool closed_by_escape);
+
// The delegate notified when the InfoBubble is closed.
InfoBubbleDelegate* delegate_;
@@ -160,8 +167,10 @@ class InfoBubble : public views::WidgetWin,
// The fade-in animation.
scoped_ptr<SlideAnimation> fade_animation_;
+ // Have we been closed?
+ bool closed_;
+
DISALLOW_COPY_AND_ASSIGN(InfoBubble);
};
#endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_
-