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

Side by Side Diff: chrome/browser/gtk/fullscreen_exit_bubble_gtk.h

Issue 1783010: GTK: more signal handler foolproofing. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
6 #define CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ 6 #define CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "app/gtk_signal.h"
10 #include "base/timer.h" 11 #include "base/timer.h"
11 #include "chrome/browser/gtk/slide_animator_gtk.h" 12 #include "chrome/browser/gtk/slide_animator_gtk.h"
12 13
13 typedef struct _GtkFloatingContainer GtkFloatingContainer; 14 typedef struct _GtkFloatingContainer GtkFloatingContainer;
14 15
15 // FullscreenExitBubbleGTK is responsible for showing a bubble atop the screen 16 // FullscreenExitBubbleGTK is responsible for showing a bubble atop the screen
16 // in fullscreen mode, telling users how to exit and providing a click target. 17 // in fullscreen mode, telling users how to exit and providing a click target.
17 class FullscreenExitBubbleGtk { 18 class FullscreenExitBubbleGtk {
18 public: 19 public:
19 // We place the bubble in |container|. 20 // We place the bubble in |container|.
20 explicit FullscreenExitBubbleGtk(GtkFloatingContainer* container); 21 explicit FullscreenExitBubbleGtk(GtkFloatingContainer* container);
21 ~FullscreenExitBubbleGtk(); 22 ~FullscreenExitBubbleGtk();
22 23
23 void InitWidgets(); 24 void InitWidgets();
24 25
25 private: 26 private:
26 GtkWidget* widget() const { 27 GtkWidget* widget() const {
27 return slide_widget_->widget(); 28 return slide_widget_->widget();
28 } 29 }
29 30
30 // Hide the exit bubble. 31 // Hide the exit bubble.
31 void Hide(); 32 void Hide();
32 33
33 static void OnSetFloatingPosition(GtkFloatingContainer* floating_container, 34 CHROMEGTK_CALLBACK_1(FullscreenExitBubbleGtk, void, OnSetFloatingPosition,
34 GtkAllocation* allocation, 35 GtkAllocation*);
35 FullscreenExitBubbleGtk* bubble); 36 CHROMEGTK_CALLBACK_0(FullscreenExitBubbleGtk, void, OnLinkClicked);
36
37 static void OnLinkClicked(GtkWidget* link,
38 FullscreenExitBubbleGtk* bubble);
39 37
40 // A pointer to the floating container that is our parent. 38 // A pointer to the floating container that is our parent.
41 GtkFloatingContainer* container_; 39 GtkFloatingContainer* container_;
42 40
43 // The widget that animates the slide-out of fullscreen exit bubble. 41 // The widget that animates the slide-out of fullscreen exit bubble.
44 scoped_ptr<SlideAnimatorGtk> slide_widget_; 42 scoped_ptr<SlideAnimatorGtk> slide_widget_;
45 43
46 // The timer that does the initial hiding of the exit bubble. 44 // The timer that does the initial hiding of the exit bubble.
47 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_; 45 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_;
46
47 GtkSignalRegistrar signals_;
48 }; 48 };
49 49
50 #endif // CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ 50 #endif // CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/browser/gtk/fullscreen_exit_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698