OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "chrome/browser/ui/views/info_bubble.h" | 10 #include "chrome/browser/ui/views/info_bubble.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 OMNIBOX_KEYWORD, | 38 OMNIBOX_KEYWORD, |
39 BROWSER_ACTION, | 39 BROWSER_ACTION, |
40 PAGE_ACTION, | 40 PAGE_ACTION, |
41 GENERIC | 41 GENERIC |
42 }; | 42 }; |
43 | 43 |
44 // Creates the ExtensionInstalledBubble and schedules it to be shown once | 44 // Creates the ExtensionInstalledBubble and schedules it to be shown once |
45 // the extension has loaded. |extension| is the installed extension. |browser| | 45 // the extension has loaded. |extension| is the installed extension. |browser| |
46 // is the browser window which will host the bubble. |icon| is the install | 46 // is the browser window which will host the bubble. |icon| is the install |
47 // icon of the extension. | 47 // icon of the extension. |
48 static void Show(const Extension* extension, Browser *browser, SkBitmap icon); | 48 static void Show( |
| 49 const Extension* extension, Browser *browser, const SkBitmap& icon); |
49 | 50 |
50 private: | 51 private: |
51 friend class base::RefCountedThreadSafe<ExtensionInstalledBubble>; | 52 friend class base::RefCountedThreadSafe<ExtensionInstalledBubble>; |
52 | 53 |
53 // Private ctor. Registers a listener for EXTENSION_LOADED. | 54 // Private ctor. Registers a listener for EXTENSION_LOADED. |
54 ExtensionInstalledBubble(const Extension* extension, Browser *browser, | 55 ExtensionInstalledBubble( |
55 SkBitmap icon); | 56 const Extension* extension, Browser *browser, const SkBitmap& icon); |
56 | 57 |
57 virtual ~ExtensionInstalledBubble(); | 58 virtual ~ExtensionInstalledBubble(); |
58 | 59 |
59 // Shows the bubble. Called internally via PostTask. | 60 // Shows the bubble. Called internally via PostTask. |
60 void ShowInternal(); | 61 void ShowInternal(); |
61 | 62 |
62 // NotificationObserver | 63 // NotificationObserver |
63 virtual void Observe(NotificationType type, | 64 virtual void Observe(NotificationType type, |
64 const NotificationSource& source, | 65 const NotificationSource& source, |
65 const NotificationDetails& details); | 66 const NotificationDetails& details); |
(...skipping 11 matching lines...) Expand all Loading... |
77 InstalledBubbleContent* bubble_content_; | 78 InstalledBubbleContent* bubble_content_; |
78 BubbleType type_; | 79 BubbleType type_; |
79 | 80 |
80 // How many times we've deferred due to animations being in progress. | 81 // How many times we've deferred due to animations being in progress. |
81 int animation_wait_retries_; | 82 int animation_wait_retries_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); | 84 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); |
84 }; | 85 }; |
85 | 86 |
86 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 87 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
OLD | NEW |