OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 ExtensionInstalledBubble(Delegate* delegate, | 55 ExtensionInstalledBubble(Delegate* delegate, |
56 const extensions::Extension* extension, | 56 const extensions::Extension* extension, |
57 Browser *browser, | 57 Browser *browser, |
58 const SkBitmap& icon); | 58 const SkBitmap& icon); |
59 | 59 |
60 virtual ~ExtensionInstalledBubble(); | 60 virtual ~ExtensionInstalledBubble(); |
61 | 61 |
62 const extensions::Extension* extension() const { return extension_; } | 62 const extensions::Extension* extension() const { return extension_; } |
63 Browser* browser() { return browser_; } | 63 Browser* browser() { return browser_; } |
| 64 const Browser* browser() const { return browser_; } |
64 const SkBitmap& icon() const { return icon_; } | 65 const SkBitmap& icon() const { return icon_; } |
65 BubbleType type() const { return type_; } | 66 BubbleType type() const { return type_; } |
66 | 67 |
67 // Stop listening to NOTIFICATION_BROWSER_CLOSING. | 68 // Stop listening to NOTIFICATION_BROWSER_CLOSING. |
68 void IgnoreBrowserClosing(); | 69 void IgnoreBrowserClosing(); |
69 | 70 |
70 private: | 71 private: |
71 // Delegates showing the view to our |view_|. Called internally via PostTask. | 72 // Delegates showing the view to our |view_|. Called internally via PostTask. |
72 void ShowInternal(); | 73 void ShowInternal(); |
73 | 74 |
(...skipping 29 matching lines...) Expand all Loading... |
103 // The number of times to retry showing the bubble if the browser action | 104 // The number of times to retry showing the bubble if the browser action |
104 // toolbar is animating. | 105 // toolbar is animating. |
105 int animation_wait_retries_; | 106 int animation_wait_retries_; |
106 | 107 |
107 base::WeakPtrFactory<ExtensionInstalledBubble> weak_factory_; | 108 base::WeakPtrFactory<ExtensionInstalledBubble> weak_factory_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); | 110 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); |
110 }; | 111 }; |
111 | 112 |
112 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ | 113 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ |
OLD | NEW |