OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/fullscreen_exit_bubble.h" | 9 #include "chrome/browser/ui/fullscreen_exit_bubble.h" |
10 #include "chrome/browser/ui/gtk/slide_animator_gtk.h" | 10 #include "chrome/browser/ui/gtk/slide_animator_gtk.h" |
11 #include "ui/base/gtk/gtk_signal.h" | 11 #include "ui/base/gtk/gtk_signal.h" |
12 #include "ui/base/gtk/gtk_signal_registrar.h" | 12 #include "ui/base/gtk/gtk_signal_registrar.h" |
13 | 13 |
14 typedef struct _GtkFloatingContainer GtkFloatingContainer; | 14 typedef struct _GtkFloatingContainer GtkFloatingContainer; |
15 typedef struct _GtkWidget GtkWidget; | 15 typedef struct _GtkWidget GtkWidget; |
16 | 16 |
17 // FullscreenExitBubbleGTK is responsible for showing a bubble atop the screen | 17 // FullscreenExitBubbleGTK is responsible for showing a bubble atop the screen |
18 // in fullscreen mode, telling users how to exit and providing a click target. | 18 // in fullscreen mode, telling users how to exit and providing a click target. |
19 class FullscreenExitBubbleGtk : public FullscreenExitBubble { | 19 class FullscreenExitBubbleGtk : public FullscreenExitBubble { |
20 public: | 20 public: |
21 // We place the bubble in |container|. | 21 // We place the bubble in |container|. |
22 FullscreenExitBubbleGtk( | 22 FullscreenExitBubbleGtk( |
23 GtkFloatingContainer* container, | 23 GtkFloatingContainer* container, |
24 CommandUpdater::CommandUpdaterDelegate* delegate); | 24 Browser* delegate, |
| 25 const GURL& url, |
| 26 bool ask_permission); |
25 virtual ~FullscreenExitBubbleGtk(); | 27 virtual ~FullscreenExitBubbleGtk(); |
26 | 28 |
27 protected: | 29 protected: |
28 // FullScreenExitBubble | 30 // FullScreenExitBubble |
29 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE; | 31 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE; |
30 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 32 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
31 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE; | 33 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE; |
32 virtual bool IsWindowActive() OVERRIDE; | 34 virtual bool IsWindowActive() OVERRIDE; |
33 virtual void Hide() OVERRIDE; | 35 virtual void Hide() OVERRIDE; |
34 virtual void Show() OVERRIDE; | 36 virtual void Show() OVERRIDE; |
(...skipping 16 matching lines...) Expand all Loading... |
51 // The widget that contains the link. | 53 // The widget that contains the link. |
52 ui::OwnedWidgetGtk link_container_; | 54 ui::OwnedWidgetGtk link_container_; |
53 | 55 |
54 // The widget that animates the slide-out of fullscreen exit bubble. | 56 // The widget that animates the slide-out of fullscreen exit bubble. |
55 scoped_ptr<SlideAnimatorGtk> slide_widget_; | 57 scoped_ptr<SlideAnimatorGtk> slide_widget_; |
56 | 58 |
57 // The timer that does the initial hiding of the exit bubble. | 59 // The timer that does the initial hiding of the exit bubble. |
58 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_; | 60 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_; |
59 | 61 |
60 ui::GtkSignalRegistrar signals_; | 62 ui::GtkSignalRegistrar signals_; |
| 63 |
| 64 const GURL& url_; |
| 65 bool show_buttons_; |
61 }; | 66 }; |
62 | 67 |
63 #endif // CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ | 68 #endif // CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ |
OLD | NEW |