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

Side by Side Diff: chrome/browser/ui/browser_list.h

Issue 2142983002: Add desktop engagement metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_LIST_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_LIST_H_
6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_ 6 #define CHROME_BROWSER_UI_BROWSER_LIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 static void RemoveObserver(chrome::BrowserListObserver* observer); 70 static void RemoveObserver(chrome::BrowserListObserver* observer);
71 71
72 // Moves all the browsers that show on workspace |new_workspace| to the end of 72 // Moves all the browsers that show on workspace |new_workspace| to the end of
73 // the browser list (i.e. the browsers that were "activated" most recently). 73 // the browser list (i.e. the browsers that were "activated" most recently).
74 static void MoveBrowsersInWorkspaceToFront(const std::string& new_workspace); 74 static void MoveBrowsersInWorkspaceToFront(const std::string& new_workspace);
75 75
76 // Called by Browser objects when their window is activated (focused). This 76 // Called by Browser objects when their window is activated (focused). This
77 // allows us to determine what the last active Browser was on each desktop. 77 // allows us to determine what the last active Browser was on each desktop.
78 static void SetLastActive(Browser* browser); 78 static void SetLastActive(Browser* browser);
79 79
80 static void NotifyBrowserNoLongerActive(Browser* browser);
chrisha 2016/07/14 13:58:48 Comment?
gayane -on leave until 09-2017 2016/07/20 20:22:02 Done.
81
80 // Closes all browsers for |profile| across all desktops. 82 // Closes all browsers for |profile| across all desktops.
81 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded 83 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded
82 // version of this method with a callback, then remove this method. 84 // version of this method with a callback, then remove this method.
83 static void CloseAllBrowsersWithProfile(Profile* profile); 85 static void CloseAllBrowsersWithProfile(Profile* profile);
84 86
85 // Closes all browsers for |profile| across all desktops. Uses 87 // Closes all browsers for |profile| across all desktops. Uses
86 // TryToCloseBrowserList() to do the actual closing and trigger any 88 // TryToCloseBrowserList() to do the actual closing and trigger any
87 // OnBeforeUnload events. If all OnBeforeUnload events are confirmed, 89 // OnBeforeUnload events. If all OnBeforeUnload events are confirmed,
88 // |on_close_success| is called. 90 // |on_close_success| is called.
89 static void CloseAllBrowsersWithProfile( 91 static void CloseAllBrowsersWithProfile(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // removal across all BrowserLists. 139 // removal across all BrowserLists.
138 static base::LazyInstance< 140 static base::LazyInstance<
139 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_; 141 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_;
140 142
141 static BrowserList* instance_; 143 static BrowserList* instance_;
142 144
143 DISALLOW_COPY_AND_ASSIGN(BrowserList); 145 DISALLOW_COPY_AND_ASSIGN(BrowserList);
144 }; 146 };
145 147
146 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ 148 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698