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

Side by Side Diff: chrome/browser/ui/views/first_run_bubble.h

Issue 9016036: Implement the new first run bubble, clean up old bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge, fix SetShowFirstRunBubblePref and test, update copyright years. Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_
6 #define CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/first_run/first_run.h"
10 #include "ui/views/bubble/bubble_delegate.h" 9 #include "ui/views/bubble/bubble_delegate.h"
11 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
11 #include "ui/views/controls/link_listener.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 class FirstRunBubble : public views::BubbleDelegateView, 15 class FirstRunBubble : public views::BubbleDelegateView,
16 public views::ButtonListener { 16 public views::LinkListener {
17 public: 17 public:
18 static FirstRunBubble* ShowBubble( 18 static FirstRunBubble* ShowBubble(Profile* profile, views::View* anchor_view);
19 Profile* profile,
20 views::View* anchor_view,
21 views::BubbleBorder::ArrowLocation location,
22 FirstRun::BubbleType bubble_type);
23 19
24 // views::BubbleDelegateView overrides: 20 // views::BubbleDelegateView overrides:
25 virtual gfx::Rect GetAnchorRect() OVERRIDE; 21 virtual gfx::Rect GetAnchorRect() OVERRIDE;
26 22
27 protected: 23 protected:
28 // views::BubbleDelegateView overrides: 24 // views::BubbleDelegateView overrides:
29 virtual void Init() OVERRIDE; 25 virtual void Init() OVERRIDE;
30 26
31 private: 27 private:
32 FirstRunBubble(Profile* profile, 28 FirstRunBubble(Profile* profile, views::View* anchor_view);
33 views::View* anchor_view,
34 views::BubbleBorder::ArrowLocation arrow_location,
35 FirstRun::BubbleType bubble_type);
36 virtual ~FirstRunBubble(); 29 virtual ~FirstRunBubble();
37 30
38 // views::ButtonListener overrides: 31 // views::LinkListener overrides:
39 virtual void ButtonPressed(views::Button* sender, 32 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
40 const views::Event& event) OVERRIDE;
41 33
42 Profile* profile_; 34 Profile* profile_;
43 35
44 FirstRun::BubbleType bubble_type_;
45
46 DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); 36 DISALLOW_COPY_AND_ASSIGN(FirstRunBubble);
47 }; 37 };
48 38
49 #endif // CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_ 39 #endif // CHROME_BROWSER_UI_VIEWS_FIRST_RUN_BUBBLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698