Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#include <gtk/gtk.h>

#include "base/timer.h"
#include "chrome/browser/gtk/slide_animator_gtk.h"

typedef struct _GtkFloatingContainer GtkFloatingContainer;

// FullscreenExitBubbleGTK is responsible for showing a bubble atop the screen
// in fullscreen mode, telling users how to exit and providing a click target.
class FullscreenExitBubbleGtk {
  // We place the bubble in |container|.
  explicit FullscreenExitBubbleGtk(GtkFloatingContainer* container);

  void InitWidgets();

  GtkWidget* widget() const {
    return slide_widget_->widget();

  // Hide the exit bubble.
  void Hide();

  static void OnSetFloatingPosition(GtkFloatingContainer* floating_container,
                                    GtkAllocation* allocation,
                                    FullscreenExitBubbleGtk* bubble);

  static void OnLinkClicked(GtkWidget* link,
                            FullscreenExitBubbleGtk* bubble);

  // A pointer to the floating container that is our parent.
  GtkFloatingContainer* container_;

  // The widget that animates the slide-out of fullscreen exit bubble.
  scoped_ptr<SlideAnimatorGtk> slide_widget_;

  // The timer that does the initial hiding of the exit bubble.
  base::OneShotTimer<FullscreenExitBubbleGtk> initial_delay_;


Generated by  Doxygen 1.6.0   Back to index