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

Side by Side Diff: chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h

Issue 9456019: Add GTK interface for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
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 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/extensions/bundle_installer.h"
12 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
13 #include "chrome/browser/ui/gtk/custom_button.h"
14
15 class Browser;
16
17 // The GTK implementation of the bundle installed bubble. The bubble reports
18 // which extensions and apps installed or failed when the bundle install
19 // completes.
20 class BundleInstalledBubbleGtk
21 : public BubbleDelegateGtk,
22 public base::RefCounted<BundleInstalledBubbleGtk> {
23 public:
24 // Displays an installed bubble in the |browser| for the |bundle|.
25 BundleInstalledBubbleGtk(const extensions::BundleInstaller* bundle,
26 Browser* browser);
27 virtual ~BundleInstalledBubbleGtk();
28
29 private:
30 friend class base::RefCounted<BundleInstalledBubbleGtk>;
31
32 // Assembles the content area of the bubble.
33 void ShowInternal(const extensions::BundleInstaller* bundle);
34
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);
40
41 // BubbleDelegateGtk, called when the bubble is about to close.
42 virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
43
44 // Closes the bubble.
45 void Close();
46
47 // Called when the user clicks the bubble's close button.
48 static void OnButtonClick(GtkWidget* button,
49 BundleInstalledBubbleGtk* bubble);
50
51 Browser* browser_;
52 scoped_ptr<CustomDrawButton> close_button_;
53 BubbleGtk* bubble_;
54
55 DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubbleGtk);
56 };
57
58 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698