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

Side by Side Diff: chrome/browser/ui/views/theme_install_bubble_view.h

Issue 8404007: Delete code for and references to mini-gallery and theme install bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: > Created 9 years, 1 month 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) 2011 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_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_
7 #pragma once
8
9 #include "base/string16.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
12 #include "ui/gfx/canvas.h"
13 #include "views/controls/label.h"
14
15 class TabContents;
16
17 namespace views {
18 class Widget;
19 }
20
21 // ThemeInstallBubbleView is a view that provides a "Loading..." bubble in the
22 // center of a browser window for use when an extension or theme is loaded.
23 // (The Browser class only calls it to install itself into the currently active
24 // browser window.) If an extension is being applied, the bubble goes away
25 // immediately. If a theme is being applied, it disappears when the theme has
26 // been loaded. The purpose of this bubble is to warn the user that the browser
27 // may be unresponsive while the theme is being installed.
28 //
29 // Edge case: note that if one installs a theme in one window and then switches
30 // rapidly to another window to install a theme there as well (in the short time
31 // between install begin and theme caching seizing the UI thread), the loading
32 // bubble will only appear over the first window, as there is only ever one
33 // instance of the bubble.
34 class ThemeInstallBubbleView : public content::NotificationObserver,
35 public views::Label {
36 public:
37 virtual ~ThemeInstallBubbleView();
38
39 // content::NotificationObserver
40 virtual void Observe(int type,
41 const content::NotificationSource& source,
42 const content::NotificationDetails& details);
43
44 // Show the loading bubble.
45 static void Show(TabContents* tab_contents);
46
47 private:
48 explicit ThemeInstallBubbleView(TabContents* tab_contents);
49
50 // Put the popup in the correct place on the tab.
51 void Reposition();
52
53 // Inherited from views.
54 virtual gfx::Size GetPreferredSize();
55
56 // Shut down the popup and remove our notifications.
57 void Close();
58
59 virtual void OnPaint(gfx::Canvas* canvas);
60
61 // The content area at the start of the animation.
62 gfx::Rect tab_contents_bounds_;
63
64 // Widget containing us.
65 views::Widget* popup_;
66
67 // Text to show warning that theme is being installed.
68 string16 text_;
69
70 // A scoped container for notification registries.
71 content::NotificationRegistrar registrar_;
72
73 DISALLOW_COPY_AND_ASSIGN(ThemeInstallBubbleView);
74 };
75
76 #endif // CHROME_BROWSER_UI_VIEWS_THEME_INSTALL_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/theme_install_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698