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

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: fix defines. Created 9 years, 2 months 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..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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/first_run_bubble.cc » ('j') | chrome/browser/ui/views/first_run_bubble.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698