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

Unified Diff: views/bubble/bubble_delegate.h

Issue 8508048: Rebase PageInfoBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ShowPageInfoBubble to browser_dialogs.h; adjust anchor. Created 9 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
Index: views/bubble/bubble_delegate.h
diff --git a/views/bubble/bubble_delegate.h b/views/bubble/bubble_delegate.h
index be02e44824c78f872f042c5e34de1f2338955e29..9b01ab4188600c45f8fed798e01bbe78be5d4f4a 100644
--- a/views/bubble/bubble_delegate.h
+++ b/views/bubble/bubble_delegate.h
@@ -29,7 +29,7 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
public Widget::Observer {
public:
BubbleDelegateView();
- BubbleDelegateView(View* anchor_view,
+ BubbleDelegateView(const View* anchor_view,
BubbleBorder::ArrowLocation arrow_location,
const SkColor& color);
virtual ~BubbleDelegateView();
@@ -59,7 +59,7 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
allow_bubble_offscreen_ = allow_bubble_offscreen;
}
- View* anchor_view() const { return anchor_view_; }
+ const View* anchor_view() const { return anchor_view_; }
bool use_focusless() const { return use_focusless_; }
void set_use_focusless(bool use_focusless) {
@@ -90,26 +90,27 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
// View overrides:
virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE;
+ // ui::AnimationDelegate overrides:
+ virtual void AnimationEnded(const ui::Animation* animation);
+ virtual void AnimationProgressed(const ui::Animation* animation);
Finnur 2011/11/15 10:05:01 Why not OVERRIDE?
msw 2011/11/15 20:16:57 Done.
+
// Perform view initialization on the contents for bubble sizing.
virtual void Init();
+ // Resizes and potentially moves the Bubble to best accommodate the
+ // contents preferred size.
+ void SizeToContents();
+
private:
FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewBasicTest, NonClientHitTest);
FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate);
- // ui::AnimationDelegate overrides:
- virtual void AnimationEnded(const ui::Animation* animation);
- virtual void AnimationProgressed(const ui::Animation* animation);
-
BubbleFrameView* GetBubbleFrameView() const;
// Get bubble bounds from the anchor point and client view's preferred size.
gfx::Rect GetBubbleBounds();
#if defined(OS_WIN) && !defined(USE_AURA)
- // Initialize the border widget needed for Windows native control hosting.
- void InitializeBorderWidget(Widget* parent_widget);
-
// Get bounds for the Windows-only widget that hosts the bubble's contents.
gfx::Rect GetBubbleClientBounds() const;
#endif
@@ -126,7 +127,7 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
bool allow_bubble_offscreen_;
// The view hosting this bubble; the arrow is anchored to this view.
- View* anchor_view_;
+ const View* anchor_view_;
// The arrow's location on the bubble.
BubbleBorder::ArrowLocation arrow_location_;

Powered by Google App Engine
This is Rietveld 408576698