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..3566641836b9e9cb739217301eba216bdd03b873 100644 |
| --- a/chrome/browser/ui/views/first_run_bubble.h |
| +++ b/chrome/browser/ui/views/first_run_bubble.h |
| @@ -10,47 +10,62 @@ |
| #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 { |
|
msw
2011/10/20 19:17:50
You shouldn't need these forward declarations, sin
alicet1
2011/10/21 19:13:16
Done.
|
| +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, |
| - views::Widget* parent, |
| - const gfx::Rect& position_relative_to, |
| - views::BubbleBorder::ArrowLocation arrow_location, |
| - FirstRun::BubbleType bubble_type); |
| + // Static method to create a first run bubble and delegate. |
| + static views::Widget* Show(Profile* profile, |
| + views::Widget* parent, |
| + const gfx::Rect& position_relative_to, |
| + views::BubbleBorder::ArrowLocation arrow_location, |
| + FirstRun::BubbleType bubble_type); |
| + |
| + // BubbleDelegateView override: |
| + virtual gfx::Point GetAnchorPoint() const OVERRIDE; |
| + |
| + // WidgetDelegate override: |
| + virtual void WindowClosing() OVERRIDE; |
| + |
| + protected: |
| + // BubbleDelegateView override: |
| + virtual void Init() OVERRIDE; |
| 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; } |
| - |
| +#if defined(OS_WIN) && !defined(USE_AURA) |
| // Re-enable the parent window. |
| void EnableParent(); |
| -#if defined(OS_WIN) && !defined(USE_AURA) |
| // Overridden from Bubble: |
| virtual void OnActivate(UINT action, BOOL minimized, HWND window) OVERRIDE; |
| #endif |
| - // BubbleDelegate. |
| - virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE; |
| - virtual bool CloseOnEscape() OVERRIDE { return true; } |
| - virtual bool FadeInOnShow() OVERRIDE { return true; } |
| + Profile* profile_; |
| + views::Widget* parent_; |
| + const gfx::Rect position_relative_to_; |
|
msw
2011/10/20 19:17:50
merge and you won't need to store position_relativ
alicet1
2011/10/21 19:13:16
Done.
|
| + views::BubbleBorder::ArrowLocation arrow_location_; |
| + FirstRun::BubbleType bubble_type_; |
| // 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); |
| }; |