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

Side by Side Diff: ui/display/desktop_observer.cc

Issue 2108933003: Reorder browser list on workspace switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from erg and thestig 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/display/desktop_observer.h"
6
7 namespace display {
8
9 namespace desktop {
10
11 namespace {
12
13 base::ObserverList<DesktopObserver> g_desktop_observer_list;
Lei Zhang 2016/06/29 20:51:01 This probably should be a LazyInstance or it will
Tom (Use chromium acct) 2016/06/29 21:12:50 Done.
14
15 } // anonymous namespace
16
17 DesktopObserver::~DesktopObserver() {}
18
19 void AddObserver(DesktopObserver* observer) {
20 g_desktop_observer_list.AddObserver(observer);
21 }
22
23 void RemoveObserver(DesktopObserver* observer) {
24 g_desktop_observer_list.RemoveObserver(observer);
25 }
26
27 void OnWorkspaceChanged(const std::string& new_workspace) {
28 FOR_EACH_OBSERVER(DesktopObserver, g_desktop_observer_list,
29 OnWorkspaceChanged(new_workspace));
30 }
31
32 } // namespace desktop
33
34 } // namespace display
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698