Chromium Code Reviews| Index: chrome/browser/ui/views/first_run_bubble.h |
| diff --git a/chrome/browser/ui/views/first_run_bubble.h b/chrome/browser/ui/views/first_run_bubble.h |
| index 72ecd806844b6ad0058dc6f0ddcf9c77b36e9452..9d4a39f8452ef4c99bab8a427b7c55433b49ca79 100644 |
| --- a/chrome/browser/ui/views/first_run_bubble.h |
| +++ b/chrome/browser/ui/views/first_run_bubble.h |
| @@ -10,47 +10,68 @@ |
| #include "base/compiler_specific.h" |
| #include "base/memory/weak_ptr.h" |
| #include "chrome/browser/first_run/first_run.h" |
| -#include "chrome/browser/ui/views/bubble/bubble.h" |
| +#include "views/bubble/bubble_delegate.h" |
| + |
| +namespace views { |
| +class View; |
| +class Widget; |
| +} |
| class FirstRunBubbleViewBase; |
| class Profile; |
| -class FirstRunBubble : public Bubble, |
| - public BubbleDelegate { |
| +class FirstRunBubble : public views::BubbleDelegateView { |
| public: |
| - static FirstRunBubble* Show(Profile* profile, |
| + static views::Widget* Show(Profile* profile, |
| views::Widget* parent, |
| const gfx::Rect& position_relative_to, |
| views::BubbleBorder::ArrowLocation arrow_location, |
| FirstRun::BubbleType bubble_type); |
| private: |
| - FirstRunBubble(); |
| + FirstRunBubble(Profile* profile, |
| + views::Widget* parent, |
| + const gfx::Rect& position_relative_to, |
| + views::BubbleBorder::ArrowLocation arrow_location, |
| + FirstRun::BubbleType bubble_type); |
| virtual ~FirstRunBubble(); |
| - void set_view(FirstRunBubbleViewBase* view) { view_ = view; } |
| + // BubbleDelegateView override: |
| + virtual void Init(); |
|
msw
2011/10/18 18:39:23
Please try to match the order and visibility (Init
alicet1
2011/10/19 05:02:15
Done.
|
| + virtual gfx::Point GetAnchorPoint() const OVERRIDE; |
| + // View override: |
|
msw
2011/10/18 18:39:23
Add a blank line before new "* overrides:" blocks.
alicet1
2011/10/19 05:02:15
Done.
|
| + virtual gfx::Size GetPreferredSize() OVERRIDE; |
| + // WidgetDelegate override: |
| + virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
| +#if !defined(USE_AURA) |
| // Re-enable the parent window. |
| void EnableParent(); |
| +#endif |
| #if defined(OS_WIN) && !defined(USE_AURA) |
| // Overridden from Bubble: |
| virtual void OnActivate(UINT action, BOOL minimized, HWND window) OVERRIDE; |
| #endif |
| - // BubbleDelegate. |
| +#if !defined(USE_AURA) |
| virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE; |
|
msw
2011/10/18 18:39:23
What is the Bubble type here?
We should be careful
alicet1
2011/10/19 05:02:15
you mean, when the bubble close, do we care how it
|
| - virtual bool CloseOnEscape() OVERRIDE { return true; } |
| - virtual bool FadeInOnShow() OVERRIDE { return true; } |
| +#endif |
| + |
| + Profile* profile_; |
| + views::Widget* parent_; |
| + const gfx::Rect position_relative_to_; |
|
msw
2011/10/18 18:39:23
I thought you liked 'anchor' :)
alicet1
2011/10/19 05:02:15
I do, but the caller (location_bar) called it posi
|
| + views::BubbleBorder::ArrowLocation arrow_location_; |
| + FirstRun::BubbleType bubble_type_; |
| + gfx::Size preferred_size_; |
| + // pointer into content view for initially focused view. Not owned. |
|
msw
2011/10/18 18:39:23
Capitalize 'p'; perhaps BubbleDelegateView should
alicet1
2011/10/19 05:02:15
Done.
|
| + views::View* initially_focused_view_; |
| // Whether we have already been activated. |
| bool has_been_activated_; |
| base::WeakPtrFactory<FirstRunBubble> enable_window_method_factory_; |
| - // The view inside the FirstRunBubble. |
| - FirstRunBubbleViewBase* view_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); |
| }; |