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

Side by Side Diff: ui/gfx/screen_display_observer_delegate.h

Issue 341983008: Listen to Display reconfiguration and notify DisplayObservers on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mac_display
Patch Set: plug to RWHVMac Created 6 years, 6 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 2014 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 #ifndef UI_GFX_SCREEN_DISPLAY_OBSERVER_DELEGATE_H_
6 #define UI_GFX_SCREEN_DISPLAY_OBSERVER_DELEGATE_H_
7
8 #include <vector>
9
10 #include "base/observer_list.h"
11 #include "ui/gfx/display_observer.h"
12
13 // ScreenDisplayObserverDelegate is a delegate for gfx::Screen. It helps
14 // handling DisplayObserver's notification.
15 class ScreenDisplayObserverDelegate {
oshima 2014/07/09 17:12:51 DisplayChangeNotifier would be better name. The na
mlamouri (slow - plz ping) 2014/07/10 12:54:34 Done.
16 public:
17 ScreenDisplayObserverDelegate();
18 ~ScreenDisplayObserverDelegate();
19
20 void AddObserver(gfx::DisplayObserver* observer);
21
22 void RemoveObserver(gfx::DisplayObserver* observer);
23
24 void NotifyDisplaysChanged(const std::vector<gfx::Display>& old_displays,
25 const std::vector<gfx::Display>& new_displays);
26
27 private:
28 // The observers that need to be notified when a display is modified, added
29 // or removed.
30 ObserverList<gfx::DisplayObserver> observer_list_;
31 };
oshima 2014/07/09 17:12:51 DISALLOW_COPY_AND_ASSIGN
mlamouri (slow - plz ping) 2014/07/10 12:54:34 Done.
32
33 #endif // UI_GFX_SCREEN_DISPLAY_OBSERVER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698