OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This is the GTK implementation of the First Run bubble, the dialog box | 5 // This is the GTK implementation of the First Run bubble, the dialog box |
6 // presented on first run of Chromium. There can only ever be a single | 6 // presented on first run of Chromium. There can only ever be a single |
7 // bubble open, so the class presents only static methods. | 7 // bubble open, so the class presents only static methods. |
8 | 8 |
9 #ifndef CHROME_BROWSER_GTK_FIRST_RUN_BUBBLE_H_ | 9 #ifndef CHROME_BROWSER_GTK_FIRST_RUN_BUBBLE_H_ |
10 #define CHROME_BROWSER_GTK_FIRST_RUN_BUBBLE_H_ | 10 #define CHROME_BROWSER_GTK_FIRST_RUN_BUBBLE_H_ |
(...skipping 17 matching lines...) Expand all Loading... |
28 // Shows the first run bubble, pointing at |rect|. | 28 // Shows the first run bubble, pointing at |rect|. |
29 static void Show(Profile* profile, | 29 static void Show(Profile* profile, |
30 GtkWidget* anchor, | 30 GtkWidget* anchor, |
31 const gfx::Rect& rect, | 31 const gfx::Rect& rect, |
32 FirstRun::BubbleType bubble_type); | 32 FirstRun::BubbleType bubble_type); |
33 | 33 |
34 // Implements the InfoBubbleGtkDelegate. We are notified when the bubble | 34 // Implements the InfoBubbleGtkDelegate. We are notified when the bubble |
35 // is about to be closed. | 35 // is about to be closed. |
36 virtual void InfoBubbleClosing(InfoBubbleGtk* info_bubble, | 36 virtual void InfoBubbleClosing(InfoBubbleGtk* info_bubble, |
37 bool closed_by_escape); | 37 bool closed_by_escape); |
38 virtual bool CloseOnEscape() { return true; } | 38 virtual bool CloseOnEscape(); |
39 | 39 |
40 // Overridden from NotificationObserver: | 40 // Overridden from NotificationObserver: |
41 virtual void Observe(NotificationType type, | 41 virtual void Observe(NotificationType type, |
42 const NotificationSource& source, | 42 const NotificationSource& source, |
43 const NotificationDetails& details); | 43 const NotificationDetails& details); |
44 | 44 |
45 private: | 45 private: |
46 FirstRunBubble(Profile* profile, | 46 FirstRunBubble(Profile* profile, |
47 GtkWidget* anchor, | 47 GtkWidget* anchor, |
48 const gfx::Rect& rect, | 48 const gfx::Rect& rect, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 std::vector<GtkWidget*> labels_; | 81 std::vector<GtkWidget*> labels_; |
82 | 82 |
83 InfoBubbleGtk* bubble_; | 83 InfoBubbleGtk* bubble_; |
84 | 84 |
85 NotificationRegistrar registrar_; | 85 NotificationRegistrar registrar_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); | 87 DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); |
88 }; | 88 }; |
89 | 89 |
90 #endif // CHROME_BROWSER_GTK_FIRST_RUN_BUBBLE_H_ | 90 #endif // CHROME_BROWSER_GTK_FIRST_RUN_BUBBLE_H_ |
OLD | NEW |