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..fc5eaf4e7e5bf6cfd244eaea20ee92581ebc742d 100644 |
| --- a/chrome/browser/ui/views/first_run_bubble.h |
| +++ b/chrome/browser/ui/views/first_run_bubble.h |
| @@ -7,49 +7,54 @@ |
| #pragma once |
| #include "base/basictypes.h" |
| -#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 { |
| +namespace views { |
| +class Label; |
|
msw
2011/11/11 02:30:21
This is no longer needed when you remove label1_ a
alicet1
2011/11/12 00:03:51
Done.
|
| +class ImageButton; |
|
msw
2011/11/11 02:30:21
This is no longer needed when you remove close_but
alicet1
2011/11/12 00:03:51
Done.
|
| +} // namespace views |
| + |
| +class FirstRunBubble : public views::BubbleDelegateView, |
| + public views::ButtonListener { |
| public: |
| static FirstRunBubble* Show(Profile* profile, |
| views::Widget* parent, |
| const gfx::Rect& position_relative_to, |
| - views::BubbleBorder::ArrowLocation arrow_location, |
| + views::BubbleBorder::ArrowLocation location, |
| FirstRun::BubbleType bubble_type); |
| + protected: |
| + // views::BubbleDelegateView overrides: |
| + virtual void Init() OVERRIDE; |
| + |
| private: |
| - FirstRunBubble(); |
| + // views::ButtonListener overrides: |
| + virtual void ButtonPressed(views::Button* sender, |
|
msw
2011/11/11 02:30:21
Order this below the ctor and dtor, same for impls
alicet1
2011/11/12 00:03:51
Done.
|
| + const views::Event& event) OVERRIDE; |
| + |
| + 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; } |
| - |
| - // 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 |
| + // Initialize labels used in the first run bubble. |
| + void InitContents(); |
| - // 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_; |
| - // Whether we have already been activated. |
| - bool has_been_activated_; |
| + views::Widget* parent_; |
|
msw
2011/11/11 02:30:21
This can be replaced with anchor_view()->GetWidget
alicet1
2011/11/12 00:03:51
removed
|
| - base::WeakPtrFactory<FirstRunBubble> enable_window_method_factory_; |
| + FirstRun::BubbleType bubble_type_; |
| - // The view inside the FirstRunBubble. |
| - FirstRunBubbleViewBase* view_; |
| + views::Label* label1_; |
|
msw
2011/11/11 02:30:21
label1_ is only ever used in Init; remove it as a
alicet1
2011/11/12 00:03:51
Done.
|
| + views::Label* label2_; |
|
msw
2011/11/11 02:30:21
label2_ is only ever used in Init; remove it as a
alicet1
2011/11/12 00:03:51
Done.
|
| + views::ImageButton* close_button_; |
|
msw
2011/11/11 02:30:21
close_button_ is only ever used in Init; remove it
alicet1
2011/11/12 00:03:51
Done.
|
| DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); |
| }; |