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

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

Issue 1803143002: Replace BrowserProces::AddRefModule/RemoveModule by ScopedKeepAlive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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 | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.h
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index f9a8392127cb2cdbf889d79ed05021e9ed1a1caa..c4ed825e11447af4ad853b1efa428b7fad40bf58 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -66,6 +66,7 @@ class BrowserWindow;
class FindBarController;
class PrefService;
class Profile;
+class ScopedKeepAlive;
class SearchDelegate;
class SearchModel;
class StatusBubble;
@@ -417,6 +418,12 @@ class Browser : public TabStripModelObserver,
// flow.
void ShowModalSyncConfirmationWindow();
+ // Used to register a KeepAlive to affect the Chrome lifetime. The KeepAlive
+ // is registered when the browser is added to the browser list, and unregisted
+ // when it is removed from it.
+ void RegisterKeepAlive();
+ void UnregisterKeepAlive();
+
// Interface implementations ////////////////////////////////////////////////
// Overridden from content::PageNavigator:
@@ -998,6 +1005,8 @@ class Browser : public TabStripModelObserver,
SigninViewController signin_view_controller_;
+ scoped_ptr<ScopedKeepAlive> keep_alive_;
+
// The following factory is used for chrome update coalescing.
base::WeakPtrFactory<Browser> chrome_updater_factory_;
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698