Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Unified Diff: chrome/browser/ui/views/first_run_bubble.h

Issue 8265005: first run bubble using the views/bubble api. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698