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..0ed895930dc516b331c3ef3453d6294ca14f381d 100644 |
| --- a/chrome/browser/ui/views/first_run_bubble.h |
| +++ b/chrome/browser/ui/views/first_run_bubble.h |
| @@ -7,49 +7,39 @@ |
| #pragma once |
| #include "base/basictypes.h" |
|
msw
2011/11/12 03:35:55
nit: Can you check if this include is still needed
alicet1
2011/11/15 02:09:50
Done.
|
| -#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" |
| +#include "views/controls/button/button.h" |
| -class FirstRunBubbleViewBase; |
| class Profile; |
| -class FirstRunBubble : public Bubble, |
| - public BubbleDelegate { |
| +class FirstRunBubble : public views::BubbleDelegateView, |
| + public views::ButtonListener { |
| public: |
| static FirstRunBubble* Show(Profile* profile, |
|
msw
2011/11/12 03:35:55
This overloads BubbleDelegateView::Show(), which i
alicet1
2011/11/15 02:09:50
Done.
|
| - views::Widget* parent, |
| - const gfx::Rect& position_relative_to, |
| - views::BubbleBorder::ArrowLocation arrow_location, |
| + views::View* anchor_view, |
| + views::BubbleBorder::ArrowLocation location, |
| FirstRun::BubbleType bubble_type); |
| + protected: |
| + // views::BubbleDelegateView overrides: |
| + virtual void Init() OVERRIDE; |
|
msw
2011/11/12 03:35:55
nit: order Init after GetAnchorPoint, like BubbleD
alicet1
2011/11/15 02:09:50
Done.
|
| + virtual gfx::Point GetAnchorPoint() OVERRIDE; |
| + |
| private: |
| - FirstRunBubble(); |
| + FirstRunBubble(Profile* profile, |
| + views::View* anchor_view, |
| + views::BubbleBorder::ArrowLocation arrow_location, |
| + FirstRun::BubbleType bubble_type); |
| virtual ~FirstRunBubble(); |
| - void set_view(FirstRunBubbleViewBase* view) { view_ = view; } |
| - |
| - // 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; } |
| - |
| - // Whether we have already been activated. |
| - bool has_been_activated_; |
| + // views::ButtonListener overrides: |
| + virtual void ButtonPressed(views::Button* sender, |
| + const views::Event& event) OVERRIDE; |
| - base::WeakPtrFactory<FirstRunBubble> enable_window_method_factory_; |
| + Profile* profile_; |
| - // The view inside the FirstRunBubble. |
| - FirstRunBubbleViewBase* view_; |
| + FirstRun::BubbleType bubble_type_; |
| DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); |
| }; |