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

Side by Side Diff: ui/display/display_list.h

Issue 2904993003: chromeos: changes how DisplayManagerObservers are notified (Closed)
Patch Set: cleanup Created 3 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
« no previous file with comments | « ui/display/display.h ('k') | ui/display/display_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 UI_DISPLAY_DISPLAY_LIST_H_ 5 #ifndef UI_DISPLAY_DISPLAY_LIST_H_
6 #define UI_DISPLAY_DISPLAY_LIST_H_ 6 #define UI_DISPLAY_DISPLAY_LIST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 Displays::const_iterator FindDisplayById(int64_t id) const; 58 Displays::const_iterator FindDisplayById(int64_t id) const;
59 59
60 Displays::const_iterator GetPrimaryDisplayIterator() const; 60 Displays::const_iterator GetPrimaryDisplayIterator() const;
61 61
62 // Internally increments a counter that while non-zero results in observers 62 // Internally increments a counter that while non-zero results in observers
63 // not being called for any changes to the displays. It is assumed once 63 // not being called for any changes to the displays. It is assumed once
64 // callers release the last lock they call the observers appropriately. 64 // callers release the last lock they call the observers appropriately.
65 std::unique_ptr<DisplayListObserverLock> SuspendObserverUpdates(); 65 std::unique_ptr<DisplayListObserverLock> SuspendObserverUpdates();
66 66
67 void AddOrUpdateDisplay(const Display& display, Type type);
68
67 // Updates the cached display based on display.id(). This returns a bitmask 69 // Updates the cached display based on display.id(). This returns a bitmask
68 // of the changed values suitable for passing to 70 // of the changed values suitable for passing to
69 // DisplayObserver::OnDisplayMetricsChanged(). 71 // DisplayObserver::OnDisplayMetricsChanged().
70 uint32_t UpdateDisplay(const Display& display); 72 uint32_t UpdateDisplay(const Display& display);
71 73
72 // Updates the cached display based on display.id(). Also updates the primary 74 // Updates the cached display based on display.id(). Also updates the primary
73 // display if |type| indicates |display| is the primary display. See single 75 // display if |type| indicates |display| is the primary display. See single
74 // argument version for description of return value. 76 // argument version for description of return value.
75 uint32_t UpdateDisplay(const Display& display, Type type); 77 uint32_t UpdateDisplay(const Display& display, Type type);
76 78
(...skipping 23 matching lines...) Expand all
100 base::ObserverList<DisplayObserver> observers_; 102 base::ObserverList<DisplayObserver> observers_;
101 103
102 int observer_suspend_lock_count_ = 0; 104 int observer_suspend_lock_count_ = 0;
103 105
104 DISALLOW_COPY_AND_ASSIGN(DisplayList); 106 DISALLOW_COPY_AND_ASSIGN(DisplayList);
105 }; 107 };
106 108
107 } // namespace display 109 } // namespace display
108 110
109 #endif // UI_DISPLAY_DISPLAY_LIST_H_ 111 #endif // UI_DISPLAY_DISPLAY_LIST_H_
OLDNEW
« no previous file with comments | « ui/display/display.h ('k') | ui/display/display_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698