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

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 chrome_tests.gypi 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fe2229332a4cdadb1aea2dfff25237c153d69109 100644
--- a/chrome/browser/ui/views/first_run_bubble.h
+++ b/chrome/browser/ui/views/first_run_bubble.h
@@ -6,50 +6,42 @@
#define CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_
#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 {
+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,
- FirstRun::BubbleType bubble_type);
+ static FirstRunBubble* ShowBubble(
+ Profile* profile,
+ views::View* anchor_view,
+ views::BubbleBorder::ArrowLocation location,
+ FirstRun::BubbleType bubble_type);
- private:
- FirstRunBubble();
- virtual ~FirstRunBubble();
-
- void set_view(FirstRunBubbleViewBase* view) { view_ = view; }
+ // views::BubbleDelegateView overrides:
+ virtual gfx::Point GetAnchorPoint() OVERRIDE;
- // Re-enable the parent window.
- void EnableParent();
+ protected:
+ // views::BubbleDelegateView overrides:
+ virtual void Init() OVERRIDE;
-#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; }
+ private:
+ FirstRunBubble(Profile* profile,
+ views::View* anchor_view,
+ views::BubbleBorder::ArrowLocation arrow_location,
+ FirstRun::BubbleType bubble_type);
+ virtual ~FirstRunBubble();
- // 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);
};
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698