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

Unified Diff: chrome/browser/first_run/first_run.h

Issue 13958003: Add a short delay before showing the first run bubble. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Safer callback (as suggested by grt@). Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698