diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 07:35:32 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 07:35:32 +0000 |
commit | 213dac2f0bff9162502fe325b6ebb85a255efcb2 (patch) | |
tree | 3640cb1f19976e38677b8632537d2d41f8444d0f /chrome/browser/views/theme_install_bubble_view.h | |
parent | 6de53d401aa8dc6c7e0a9874c71a95ce88ade50d (diff) | |
download | chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.zip chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.tar.gz chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.tar.bz2 |
Move browser/views to browser/ui/views
TBR=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4694005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65508 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.h | 72 |
1 files changed, 3 insertions, 69 deletions
diff --git a/chrome/browser/views/theme_install_bubble_view.h b/chrome/browser/views/theme_install_bubble_view.h index dfe9dc4..b0eddec 100644 --- a/chrome/browser/views/theme_install_bubble_view.h +++ b/chrome/browser/views/theme_install_bubble_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -6,74 +6,8 @@ #define CHROME_BROWSER_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_ #pragma once -#include <string> - -#include "chrome/common/notification_observer.h" -#include "chrome/common/notification_registrar.h" -#include "chrome/common/notification_service.h" -#include "gfx/canvas.h" -#include "views/controls/label.h" - -class TabContents; - -namespace views { -class Widget; -} - -// 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, as there is only ever one -// instance of the bubble. -class ThemeInstallBubbleView : public NotificationObserver, - public views::Label { - public: - ~ThemeInstallBubbleView(); - - // NotificationObserver - virtual void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); - - // Show the loading bubble. - static void Show(TabContents* tab_contents); - - private: - explicit ThemeInstallBubbleView(TabContents* tab_contents); - - // Put the popup in the correct place on the tab. - void Reposition(); - - // Inherited from views. - gfx::Size GetPreferredSize(); - - // Shut down the popup and remove our notifications. - void Close(); - - virtual void Paint(gfx::Canvas* canvas); - - // The content area at the start of the animation. - gfx::Rect tab_contents_bounds_; - - // Widget containing us. - views::Widget* popup_; - - // Text to show warning that theme is being installed. - std::wstring text_; - - // A scoped container for notification registries. - NotificationRegistrar registrar_; - - DISALLOW_COPY_AND_ASSIGN(ThemeInstallBubbleView); -}; +#include "chrome/browser/ui/views/theme_install_bubble_view.h" +// TODO(beng): remove this file once all includes have been updated. #endif // CHROME_BROWSER_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_ |