1// Copyright (c) 2012 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// This is the GTK implementation of the First Run bubble, the dialog box 6// presented on first run of Chromium. There can only ever be a single 7// bubble open, so the class presents only static methods. 8 9#ifndef CHROME_BROWSER_UI_GTK_FIRST_RUN_BUBBLE_H_ 10#define CHROME_BROWSER_UI_GTK_FIRST_RUN_BUBBLE_H_ 11 12#include <gtk/gtk.h> 13 14#include "base/compiler_specific.h" 15#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 16 17class Browser; 18 19class FirstRunBubble : public BubbleDelegateGtk { 20 public: 21 // Shows the first run bubble, pointing at |rect|, transient for the toplevel 22 // window of the |anchor| widget. 23 static void Show(Browser* browser, GtkWidget* anchor, const gfx::Rect& rect); 24 25 // Overridden from BubbleDelegateGtk: 26 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE; 27 28 private: 29 FirstRunBubble(Browser* browser, GtkWidget* anchor, const gfx::Rect& rect); 30 virtual ~FirstRunBubble(); 31 32 CHROMEGTK_CALLBACK_0(FirstRunBubble, void, HandleDestroy); 33 CHROMEGTK_CALLBACK_0(FirstRunBubble, void, HandleChangeLink); 34 35 Browser* browser_; 36 BubbleGtk* bubble_; 37 38 DISALLOW_COPY_AND_ASSIGN(FirstRunBubble); 39}; 40 41#endif // CHROME_BROWSER_UI_GTK_FIRST_RUN_BUBBLE_H_ 42