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

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

Issue 8283028: GTK version of fullscreen API exit bubble. (Closed) Base URL: matter:/usr/local/google/chromium/src@trunk
Patch Set: Created 9 years, 2 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) 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"
(...skipping 20 matching lines...) Expand all
31 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE; 31 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE;
32 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; 32 virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
33 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE; 33 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE;
34 virtual bool IsWindowActive() OVERRIDE; 34 virtual bool IsWindowActive() OVERRIDE;
35 virtual void Hide() OVERRIDE; 35 virtual void Hide() OVERRIDE;
36 virtual void Show() OVERRIDE; 36 virtual void Show() OVERRIDE;
37 virtual bool IsAnimating() OVERRIDE; 37 virtual bool IsAnimating() OVERRIDE;
38 38
39 private: 39 private:
40 void InitWidgets(); 40 void InitWidgets();
41 std::string GetMessage(const GURL& url);
42 void HideButtons();
41 43
42 GtkWidget* widget() const { 44 GtkWidget* widget() const {
43 return slide_widget_->widget(); 45 return slide_widget_->widget();
44 } 46 }
45 47
46 CHROMEGTK_CALLBACK_1(FullscreenExitBubbleGtk, void, OnSetFloatingPosition, 48 CHROMEGTK_CALLBACK_1(FullscreenExitBubbleGtk, void, OnSetFloatingPosition,
47 GtkAllocation*); 49 GtkAllocation*);
48 CHROMEGTK_CALLBACK_0(FullscreenExitBubbleGtk, void, OnLinkClicked); 50 CHROMEGTK_CALLBACK_0(FullscreenExitBubbleGtk, void, OnLinkClicked);
51 CHROMEGTK_CALLBACK_0(FullscreenExitBubbleGtk, void, OnAllowClicked);
52 CHROMEGTK_CALLBACK_0(FullscreenExitBubbleGtk, void, OnDenyClicked);
49 53
50 // A pointer to the floating container that is our parent. 54 // A pointer to the floating container that is our parent.
51 GtkFloatingContainer* container_; 55 GtkFloatingContainer* container_;
52 56
53 // The widget that contains the link. 57 // The widget that contains the UI.
54 ui::OwnedWidgetGtk link_container_; 58 ui::OwnedWidgetGtk ui_container_;
59 GtkWidget* link_;
60 GtkWidget* allow_button_;
61 GtkWidget* deny_button_;
62 GtkWidget* button_link_hbox_;
tony 2011/10/14 17:56:05 This variable isn't used.
jeremya 2011/10/15 01:44:55 Done.
55 63
56 // The widget that animates the slide-out of fullscreen exit bubble. 64 // The widget that animates the slide-out of fullscreen exit bubble.
57 scoped_ptr<SlideAnimatorGtk> slide_widget_; 65 scoped_ptr<SlideAnimatorGtk> slide_widget_;
58 66
59 // The timer that does the initial hiding of the exit bubble. 67 // The timer that does the initial hiding of the exit bubble.
60 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_; 68 base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_;
61 69
62 ui::GtkSignalRegistrar signals_; 70 ui::GtkSignalRegistrar signals_;
63 71
64 const GURL& url_; 72 const GURL url_;
65 bool show_buttons_; 73 bool show_buttons_;
66 }; 74 };
67 75
68 #endif // CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_ 76 #endif // CHROME_BROWSER_UI_GTK_FULLSCREEN_EXIT_BUBBLE_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698