Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / chrome / browser / ui / gtk / extensions / bundle_installed_bubble_gtk.h
blob1884fe35d258034fbf06c53088faeb2806c3e019
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.
5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/bundle_installer.h"
11 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
12 #include "chrome/browser/ui/gtk/custom_button.h"
14 class Browser;
16 // The GTK implementation of the bundle installed bubble. The bubble reports
17 // which extensions and apps installed or failed when the bundle install
18 // completes.
19 class BundleInstalledBubbleGtk
20 : public BubbleDelegateGtk,
21 public base::RefCounted<BundleInstalledBubbleGtk> {
22 public:
23 // Displays an installed bubble in the |browser| for the |bundle|.
24 BundleInstalledBubbleGtk(const extensions::BundleInstaller* bundle,
25 Browser* browser);
27 private:
28 friend class base::RefCounted<BundleInstalledBubbleGtk>;
30 virtual ~BundleInstalledBubbleGtk();
32 // Assembles the content area of the bubble.
33 void ShowInternal(const extensions::BundleInstaller* bundle);
35 // The bubble lists the items that installed successfully and those that
36 // failed. This assembles the lists for items in the given |state|.
37 void InsertExtensionList(GtkWidget* parent,
38 const extensions::BundleInstaller* bundle,
39 extensions::BundleInstaller::Item::State state);
41 // BubbleDelegateGtk, called when the bubble is about to close.
42 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
44 // Closes the bubble.
45 void Close();
47 // Called when the user clicks the bubble's close button.
48 static void OnButtonClick(GtkWidget* button,
49 BundleInstalledBubbleGtk* bubble);
51 Browser* browser_;
52 scoped_ptr<CustomDrawButton> close_button_;
53 BubbleGtk* bubble_;
55 DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubbleGtk);
58 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_