Index: chrome/browser/first_run/first_run.h |
diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h |
index 2bebc4620e642b7c4a61ccb416ce96abd4d5c986..8a4037551429b9464b76614e5aefed4362652fff 100644 |
--- a/chrome/browser/first_run/first_run.h |
+++ b/chrome/browser/first_run/first_run.h |
@@ -12,10 +12,13 @@ |
#include "base/compiler_specific.h" |
#include "base/gtest_prod_util.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/ui/browser_list_observer.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "ui/gfx/native_widget_types.h" |
+class Browser; |
class CommandLine; |
class GURL; |
class PrefRegistrySyncable; |
@@ -184,7 +187,10 @@ ProcessMasterPreferencesResult ProcessMasterPreferences( |
// Show the first run search engine bubble at the first appropriate opportunity. |
// This bubble may be delayed by other UI, like global errors and sync promos. |
-class FirstRunBubbleLauncher : public content::NotificationObserver { |
+class FirstRunBubbleLauncher |
+ : public content::NotificationObserver, |
+ public chrome::BrowserListObserver, |
+ public base::SupportsWeakPtr<FirstRunBubbleLauncher> { |
public: |
// Show the bubble at the first appropriate opportunity. This function |
// instantiates a FirstRunBubbleLauncher, which manages its own lifetime. |
@@ -199,7 +205,13 @@ class FirstRunBubbleLauncher : public content::NotificationObserver { |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // chrome::BrowserListObserver override: |
+ virtual void OnBrowserRemoved(Browser* browser) OVERRIDE; |
+ |
+ void DoShowFirstRunBubble(); |
+ |
content::NotificationRegistrar registrar_; |
+ Browser* browser_; |
DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
}; |