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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h
diff --git a/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h b/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1b691b5778b4c708e059f15f24a6b6411126708
--- /dev/null
+++ b/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2012 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.
+
+#ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
+#define CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_
+#pragma once
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/extensions/bundle_installer.h"
+#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
+#include "chrome/browser/ui/gtk/custom_button.h"
+
+class Browser;
+
+// The GTK implementation of the bundle installed bubble. The bubble reports
+// which extensions and apps installed or failed when the bundle install
+// completes.
+class BundleInstalledBubbleGtk
+ : public BubbleDelegateGtk,
+ public base::RefCounted<BundleInstalledBubbleGtk> {
+ public:
+ // Displays an installed bubble in the |browser| for the |bundle|.
+ BundleInstalledBubbleGtk(const extensions::BundleInstaller* bundle,
+ Browser* browser);
+ virtual ~BundleInstalledBubbleGtk();
+
+ private:
+ friend class base::RefCounted<BundleInstalledBubbleGtk>;
+
+ // Assembles the content area of the bubble.
+ void ShowInternal(const extensions::BundleInstaller* bundle);
+
+ // The bubble lists the items that installed successfully and those that
+ // failed. This assembles the lists for items in the given |state|.
+ void InsertExtensionList(GtkWidget* parent,
+ const extensions::BundleInstaller* bundle,
+ extensions::BundleInstaller::Item::State state);
+
+ // BubbleDelegateGtk, called when the bubble is about to close.
+ virtual void BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
+
+ // Closes the bubble.
+ void Close();
+
+ // Called when the user clicks the bubble's close button.
+ static void OnButtonClick(GtkWidget* button,
+ BundleInstalledBubbleGtk* bubble);
+
+ Browser* browser_;
+ scoped_ptr<CustomDrawButton> close_button_;
+ BubbleGtk* bubble_;
+
+ DISALLOW_COPY_AND_ASSIGN(BundleInstalledBubbleGtk);
+};
+
+#endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_BUNDLE_INSTALLED_BUBBLE_GTK_H_

Powered by Google App Engine
This is Rietveld 408576698