summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/theme_install_bubble_view.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 15:55:33 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 15:55:33 +0000
commita99f5b8a912687a14a2cf0a5aede7ffc2eef8c8a (patch)
treefcb25e0363ba46c02e8ee1a2aa474b269c67f823 /chrome/browser/views/theme_install_bubble_view.h
parent9973ceb80aa79dc730b9f39e9666a7ad28130d39 (diff)
downloadchromium_src-a99f5b8a912687a14a2cf0a5aede7ffc2eef8c8a.zip
chromium_src-a99f5b8a912687a14a2cf0a5aede7ffc2eef8c8a.tar.gz
chromium_src-a99f5b8a912687a14a2cf0a5aede7ffc2eef8c8a.tar.bz2
Show "Loading" bubble while loading a theme.
BUG=http://crbug.com/22219 TEST=load a theme, see "Loading..." Review URL: http://codereview.chromium.org/267031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/theme_install_bubble_view.h')
-rw-r--r--chrome/browser/views/theme_install_bubble_view.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/chrome/browser/views/theme_install_bubble_view.h b/chrome/browser/views/theme_install_bubble_view.h
index 3ac742f..694862e 100644
--- a/chrome/browser/views/theme_install_bubble_view.h
+++ b/chrome/browser/views/theme_install_bubble_view.h
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifndef CHROME_BROWSER_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_
+#define CHROME_BROWSER_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_
+
#include "app/gfx/canvas.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/notification_registrar.h"
@@ -9,22 +12,22 @@
#include "views/controls/label.h"
#include "views/widget/widget_win.h"
-// ThemeInstallBubbleView launches a "loading..." bubble in the center of the
-// currently active browser window when an extension or theme is loaded. If
-// an extension is being applied, the bubble goes away immediately. If a theme
-// is being applied, it disappears when the theme has been loaded. The purpose
-// of this bubble is to warn the user that the browser may be unresponsive
-// while the theme is being installed.
+// ThemeInstallBubbleView is a view that provides a "Loading..." bubble in the
+// center of a browser window for use when an extension or theme is loaded.
+// (The Browser class only calls it to install itself into the currently active
+// browser window.) If an extension is being applied, the bubble goes away
+// immediately. If a theme is being applied, it disappears when the theme has
+// been loaded. The purpose of this bubble is to warn the user that the browser
+// may be unresponsive while the theme is being installed.
//
// Edge case: note that if one installs a theme in one window and then switches
-// rapidly to another window to install a theme there as well (in the short
-// time between install begin and theme caching seizing the UI thread), the
-// loading bubble will only appear over the first window.
+// rapidly to another window to install a theme there as well (in the short time
+// between install begin and theme caching seizing the UI thread), the loading
+// bubble will only appear over the first window, as there is only ever one
+// instance of the bubble.
class ThemeInstallBubbleView : public NotificationObserver,
public views::Label {
public:
- explicit ThemeInstallBubbleView(TabContents* tab_contents);
-
~ThemeInstallBubbleView();
// NotificationObserver
@@ -36,8 +39,7 @@ class ThemeInstallBubbleView : public NotificationObserver,
static void Show(TabContents* tab_contents);
private:
- // The roundedness of the edges of our bubble.
- static const int kBubbleCornerRadius = 4;
+ explicit ThemeInstallBubbleView(TabContents* tab_contents);
// The content area at the start of the animation.
gfx::Rect tab_contents_bounds_;
@@ -65,3 +67,5 @@ class ThemeInstallBubbleView : public NotificationObserver,
DISALLOW_COPY_AND_ASSIGN(ThemeInstallBubbleView);
};
+#endif // CHROME_BROWSER_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_
+