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

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: Created 4 years, 4 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 // Notifies the observers when the current active browser becomes not active.
81 static void NotifyBrowserNoLongerActive(Browser* browser);
Lei Zhang 2016/08/01 17:29:02 Do you really need this, or can you infer a given
gayane -on leave until 09-2017 2016/08/02 17:13:44 I need this because when user removes the focus fr
82
80 // Closes all browsers for |profile| across all desktops. 83 // Closes all browsers for |profile| across all desktops.
81 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded 84 // TODO(mlerman): Move the Profile Deletion flow to use the overloaded
82 // version of this method with a callback, then remove this method. 85 // version of this method with a callback, then remove this method.
83 static void CloseAllBrowsersWithProfile(Profile* profile); 86 static void CloseAllBrowsersWithProfile(Profile* profile);
84 87
85 // Closes all browsers for |profile| across all desktops. Uses 88 // Closes all browsers for |profile| across all desktops. Uses
86 // TryToCloseBrowserList() to do the actual closing and trigger any 89 // TryToCloseBrowserList() to do the actual closing and trigger any
87 // OnBeforeUnload events. If all OnBeforeUnload events are confirmed, 90 // OnBeforeUnload events. If all OnBeforeUnload events are confirmed,
88 // |on_close_success| is called. 91 // |on_close_success| is called.
89 static void CloseAllBrowsersWithProfile( 92 static void CloseAllBrowsersWithProfile(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // removal across all BrowserLists. 140 // removal across all BrowserLists.
138 static base::LazyInstance< 141 static base::LazyInstance<
139 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_; 142 base::ObserverList<chrome::BrowserListObserver>>::Leaky observers_;
140 143
141 static BrowserList* instance_; 144 static BrowserList* instance_;
142 145
143 DISALLOW_COPY_AND_ASSIGN(BrowserList); 146 DISALLOW_COPY_AND_ASSIGN(BrowserList);
144 }; 147 };
145 148
146 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_ 149 #endif // CHROME_BROWSER_UI_BROWSER_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698