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

Side by Side Diff: ui/views/bubble/bubble_delegate.h

Issue 8909013: Patch AvatarMenuBubbleView crash; only SizeToContents if GetBubbleFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Run OnAvatarMenuModelChanged on Init, not ctor. Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "ui/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 100 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
101 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 101 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
102 102
103 // Perform view initialization on the contents for bubble sizing. 103 // Perform view initialization on the contents for bubble sizing.
104 virtual void Init(); 104 virtual void Init();
105 105
106 // Resizes and potentially moves the Bubble to best accommodate the 106 // Resizes and potentially moves the Bubble to best accommodate the
107 // contents preferred size. 107 // contents preferred size.
108 void SizeToContents(); 108 void SizeToContents();
109 109
110 BubbleFrameView* GetBubbleFrameView() const;
111
110 private: 112 private:
111 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewBasicTest, NonClientHitTest); 113 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewBasicTest, NonClientHitTest);
112 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); 114 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate);
113 115
114 BubbleFrameView* GetBubbleFrameView() const;
115
116 // Get bubble bounds from the anchor point and client view's preferred size. 116 // Get bubble bounds from the anchor point and client view's preferred size.
117 gfx::Rect GetBubbleBounds(); 117 gfx::Rect GetBubbleBounds();
118 118
119 #if defined(OS_WIN) && !defined(USE_AURA) 119 #if defined(OS_WIN) && !defined(USE_AURA)
120 // Get bounds for the Windows-only widget that hosts the bubble's contents. 120 // Get bounds for the Windows-only widget that hosts the bubble's contents.
121 gfx::Rect GetBubbleClientBounds() const; 121 gfx::Rect GetBubbleClientBounds() const;
122 #endif 122 #endif
123 123
124 // Fade animation for bubble. 124 // Fade animation for bubble.
125 scoped_ptr<ui::SlideAnimation> fade_animation_; 125 scoped_ptr<ui::SlideAnimation> fade_animation_;
(...skipping 24 matching lines...) Expand all
150 // Create a popup window for focusless bubbles on Linux/ChromeOS. 150 // Create a popup window for focusless bubbles on Linux/ChromeOS.
151 // These bubbles are not interactive and should not gain focus. 151 // These bubbles are not interactive and should not gain focus.
152 bool use_focusless_; 152 bool use_focusless_;
153 153
154 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); 154 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView);
155 }; 155 };
156 156
157 } // namespace views 157 } // namespace views
158 158
159 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ 159 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698