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

Unified Diff: chrome/browser/views/extensions/extension_popup.h

Issue 1774012: Support for clipped experimental popup repositioning (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months 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
Index: chrome/browser/views/extensions/extension_popup.h
===================================================================
--- chrome/browser/views/extensions/extension_popup.h (revision 47515)
+++ chrome/browser/views/extensions/extension_popup.h (working copy)
@@ -43,6 +43,11 @@
// into the popup. An example use is for automation resource routing in
// Chrome-Frame. See extension_popup_api.cc.
virtual void ExtensionHostCreated(ExtensionHost* host) {}
+
+ // Called when the ExtensionPopup is resized. Note that the popup may have
+ // an empty bounds, if a popup is repositioned before the hosted content
+ // has loaded.
+ virtual void ExtensionPopupResized(ExtensionPopup* popup) {}
};
enum PopupChrome {
@@ -100,6 +105,18 @@
ExtensionHost* host() const { return extension_host_.get(); }
+ // Assigns the arrow location of the popup view, and updates the popup
+ // border widget, if necessary.
+ void SetArrowPosition(BubbleBorder::ArrowLocation arrow_location);
+ BubbleBorder::ArrowLocation arrow_position() const {
+ return anchor_position_;
+ }
+
+ // Gives the desired bounds (in screen coordinates) given the rect to point
+ // to and the size of the contained contents. Includes all of the
+ // border-chrome surrounding the pop-up as well.
+ gfx::Rect GetOuterBounds() const;
+
// BrowserBubble overrides.
virtual void Hide();
virtual void Show(bool activate);
@@ -138,12 +155,6 @@
PopupChrome chrome,
Observer* observer);
- // Gives the desired bounds (in screen coordinates) given the rect to point
- // to and the size of the contained contents. Includes all of the
- // border-chrome surrounding the pop-up as well.
- gfx::Rect GetOuterBounds(const gfx::Rect& position_relative_to,
- const gfx::Size& contents_size) const;
-
// The area on the screen that the popup should be positioned relative to.
gfx::Rect relative_to_;
« no previous file with comments | « chrome/browser/extensions/extension_popup_api.cc ('k') | chrome/browser/views/extensions/extension_popup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698