Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6331)

Unified Diff: chrome/browser/views/info_bubble.h

Issue 376014: Reland Extension Installed InfoBubble (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/extensions/extension_installed_bubble.cc ('k') | chrome/browser/views/info_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/info_bubble.h
diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h
index 996413a6909ef0ee3fb6166cdf5edc8b734a2124..0e7e6228ad735058cac1f5219d08d00f6cc0e18f 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,
« no previous file with comments | « chrome/browser/views/extensions/extension_installed_bubble.cc ('k') | chrome/browser/views/info_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698