summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/info_bubble.h
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-06 23:27:01 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-06 23:27:01 +0000
commit11a4b1bd05f3d419a2164ecbe0e2ec12726f523b (patch)
tree3f3ba4dc644dc42ccaa4c959b1276f30c404ceb7 /chrome/browser/views/info_bubble.h
parent81a7e67a0dbb0133f5c016d3eb04ed1116ba6717 (diff)
downloadchromium_src-11a4b1bd05f3d419a2164ecbe0e2ec12726f523b.zip
chromium_src-11a4b1bd05f3d419a2164ecbe0e2ec12726f523b.tar.gz
chromium_src-11a4b1bd05f3d419a2164ecbe0e2ec12726f523b.tar.bz2
Extension Installed InfoBubble
This creates UI feedback upon successful installation of an extension. An InfoBubble is shown containing the install icon and some information about how to manage extensions. TEST=Install a packaged extension. Verify the InfoBubble is shown, with the install icon and some description. The InfoBubble should disappear when the bubble looses focus (click elsewhere). For a browserAction, the bubble should point to the browserAction icon. For a pageAction **that has a "default_icon" set in it's manifest (see the samples/subscribe_page_action in this CL)**, it should point to a temporarily shown pageAction icon that will be hidden when the bubble closes. Otherwise it should point to the wrench menu. BUG=21412 Review URL: http://codereview.chromium.org/362022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/info_bubble.h')
-rw-r--r--chrome/browser/views/info_bubble.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h
index 996413a..0e7e622 100644
--- a/chrome/browser/views/info_bubble.h
+++ b/chrome/browser/views/info_bubble.h
@@ -74,6 +74,12 @@ class InfoBubbleDelegate {
// Whether the InfoBubble should be closed when the Esc key is pressed.
virtual bool CloseOnEscape() = 0;
+
+ // Whether the default placement of the anchor is on the origin side of the
+ // text direction. For example: if true (the default) in LTR text direction,
+ // the ArrowLocation will be TOP_LEFT, if false it will be TOP_RIGHT.
+ // RTL is the reverse.
+ virtual bool PreferOriginSideAnchor() { return true; }
};
// TODO: this code is ifdef-tastic. It might be cleaner to refactor the
@@ -92,9 +98,13 @@ class InfoBubble
// screen coordinates at which the InfoBubble will point. Show() takes
// ownership of |contents| and deletes the created InfoBubble when another
// window is activated. You can explicitly close the bubble by invoking
- // Close(). You may provide an optional |delegate| to be notified when the
- // InfoBubble is closed and/or to prevent the InfoBubble from being closed
- // when the Escape key is pressed (the default behavior).
+ // Close(). You may provide an optional |delegate| to:
+ // - Be notified when the InfoBubble is closed.
+ // - Prevent the InfoBubble from being closed when the Escape key is
+ // pressed (the default behavior).
+ // - Have the InfoBubble prefer to anchor its arrow to the non-origin
+ // side of text direction. (see comment above
+ // InfoBubbleDelegate::PreferOriginSideAnchor); .
static InfoBubble* Show(views::Window* parent,
const gfx::Rect& position_relative_to,
views::View* contents,