diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 23:48:54 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 23:48:54 +0000 |
commit | 706197adc80edd1b1b73a6eea38a5b080609b103 (patch) | |
tree | 9b5ed9d55107366ad484ec1802ab938a51e13a22 /chrome/browser/views/extensions/extension_installed_bubble.h | |
parent | fd01250e35bb184937b3fe439d2d7ffc0d96c15f (diff) | |
download | chromium_src-706197adc80edd1b1b73a6eea38a5b080609b103.zip chromium_src-706197adc80edd1b1b73a6eea38a5b080609b103.tar.gz chromium_src-706197adc80edd1b1b73a6eea38a5b080609b103.tar.bz2 |
Revert 31322 - Extension Installed InfoBubble
This creates UI feedback upon successful installation of an extension. An InfoBubble is shown containing the install icon and some information about how to manage extensions.
TEST=Install a packaged extension. Verify the InfoBubble is shown, with the install icon and some description. The InfoBubble should disappear when the bubble looses focus (click elsewhere). For a browserAction, the bubble should point to the browserAction icon. For a pageAction **that has a "default_icon" set in it's manifest (see the samples/subscribe_page_action in this CL)**, it should point to a temporarily shown pageAction icon that will be hidden when the bubble closes. Otherwise it should point to the wrench menu.
BUG=21412
Review URL: http://codereview.chromium.org/362022
TBR=rafaelw@chromium.org
Review URL: http://codereview.chromium.org/375019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/extensions/extension_installed_bubble.h')
-rw-r--r-- | chrome/browser/views/extensions/extension_installed_bubble.h | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/chrome/browser/views/extensions/extension_installed_bubble.h b/chrome/browser/views/extensions/extension_installed_bubble.h deleted file mode 100644 index def9fcb..0000000 --- a/chrome/browser/views/extensions/extension_installed_bubble.h +++ /dev/null @@ -1,81 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ -#define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ - -#include "base/ref_counted.h" -#include "chrome/browser/views/info_bubble.h" -#include "chrome/common/notification_observer.h" -#include "chrome/common/notification_registrar.h" -#include "third_party/skia/include/core/SkBitmap.h" - -class Browser; -class Extension; -class SkBitmap; - -// Provides feedback to the user upon successful installation of an -// extension. Depending on the type of extension, the InfoBubble will -// point to: -// BROWSER_ACTION -> The browserAction icon in the toolbar. -// PAGE_ACTION -> A preview of the pageAction icon in the location -// bar which is shown while the InfoBubble is shown. -// GENERIC -> The wrench menu. This case includes pageActions that -// don't specify a default icon. -// -// ExtensionInstallBubble manages its own lifetime. -class ExtensionInstalledBubble : - public InfoBubbleDelegate, - public NotificationObserver, - public base::RefCountedThreadSafe<ExtensionInstalledBubble> { - public: - // The behavior and content of this InfoBubble comes in three varieties. - enum BubbleType { - BROWSER_ACTION, - PAGE_ACTION, - GENERIC - }; - - // Creates the ExtensionInstalledBubble and schedules it to be shown once - // the extension has loaded. |extension| is the installed extension. |browser| - // is the browser window which will host the bubble. |icon| is the install - // icon of the extension. - static void Show(Extension *extension, Browser *browser, SkBitmap icon); - -private: - friend class base::RefCountedThreadSafe<ExtensionInstalledBubble>; - - // Private ctor. Registers a listener for EXTENSION_LOADED. - ExtensionInstalledBubble(Extension *extension, Browser *browser, - SkBitmap icon); - - ~ExtensionInstalledBubble() {} - - // Shows the bubble. Called internally via PostTask. - void ShowInternal(); - - // NotificationObserver - virtual void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); - - // InfoBubbleDelegate - virtual void InfoBubbleClosing(InfoBubble* info_bubble, - bool closed_by_escape); - virtual bool CloseOnEscape() { return true; } - - // Arrow subjects appear on the right side (for RTL), so do not prefer - // origin side anchor. - virtual bool PreferOriginSideAnchor() { return false; } - - Extension *extension_; - Browser *browser_; - SkBitmap icon_; - NotificationRegistrar registrar_; - BubbleType type_; - - DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); -}; - -#endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |