| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ |
| 7 |
| 8 #include <gtk/gtk.h> |
| 9 |
| 10 #include "base/timer.h" |
| 11 #include "chrome/common/owned_widget_gtk.h" |
| 12 |
| 13 typedef struct _GtkFloatingContainer GtkFloatingContainer; |
| 14 |
| 15 // 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 class FullscreenExitBubbleGtk { |
| 18 public: |
| 19 // We place the bubble in |container|. |
| 20 explicit FullscreenExitBubbleGtk(GtkFloatingContainer* container); |
| 21 ~FullscreenExitBubbleGtk(); |
| 22 |
| 23 void InitWidgets(); |
| 24 |
| 25 private: |
| 26 // Hide the exit bubble. |
| 27 void Hide(); |
| 28 |
| 29 static void OnSetFloatingPosition(GtkFloatingContainer* floating_container, |
| 30 GtkAllocation* allocation, |
| 31 FullscreenExitBubbleGtk* bubble); |
| 32 |
| 33 static void OnLinkClicked(GtkWidget* link, |
| 34 FullscreenExitBubbleGtk* bubble); |
| 35 |
| 36 // A pointer to the floating container that is our parent. |
| 37 GtkFloatingContainer* container_; |
| 38 |
| 39 // The top widget of the exit bubble. |
| 40 OwnedWidgetGtk alignment_; |
| 41 |
| 42 // The timer that does the initial hiding of the exit bubble. |
| 43 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_; |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ |
| OLD | NEW |