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..6d16816aff82f1c3c8b95031a96e2fcb000359a2 100644 |
--- a/chrome/browser/ui/views/first_run_bubble.h |
+++ b/chrome/browser/ui/views/first_run_bubble.h |
@@ -10,47 +10,50 @@ |
#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" |
-class FirstRunBubbleViewBase; |
+class FirstRunBubbleView; |
class Profile; |
-class FirstRunBubble : public Bubble, |
- public BubbleDelegate { |
+class FirstRunBubble : public views::BubbleDelegateView { |
public: |
+ // Static method to create a first run bubble and delegate. |
static FirstRunBubble* Show(Profile* profile, |
views::Widget* parent, |
const gfx::Rect& position_relative_to, |
- views::BubbleBorder::ArrowLocation arrow_location, |
- FirstRun::BubbleType bubble_type); |
+ views::BubbleBorder::ArrowLocation location); |
+ |
+ // 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); |
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_; |
// 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); |
}; |