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

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

Issue 2784173002: Changes how window is updated when display changes in mash (Closed)
Patch Set: feedback Created 3 years, 8 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 | « ash/wm/window_state_unittest.cc ('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 // Updates the cached display based on display.id(). 67 // Updates the cached display based on display.id(). This returns a bitmask
68 void UpdateDisplay(const Display& display); 68 // of the changed values suitable for passing to
69 // DisplayObserver::OnDisplayMetricsChanged().
70 uint32_t UpdateDisplay(const Display& display);
69 71
70 // Updates the cached display based on display.id(). Also updates the primary 72 // Updates the cached display based on display.id(). Also updates the primary
71 // display if |type| indicates |display| is the primary display. 73 // display if |type| indicates |display| is the primary display. See single
72 void UpdateDisplay(const Display& display, Type type); 74 // argument version for description of return value.
75 uint32_t UpdateDisplay(const Display& display, Type type);
73 76
74 // Adds a new Display. 77 // Adds a new Display.
75 void AddDisplay(const Display& display, Type type); 78 void AddDisplay(const Display& display, Type type);
76 79
77 // Removes the Display with the specified id. 80 // Removes the Display with the specified id.
78 void RemoveDisplay(int64_t id); 81 void RemoveDisplay(int64_t id);
79 82
80 base::ObserverList<DisplayObserver>* observers() { return &observers_; } 83 base::ObserverList<DisplayObserver>* observers() { return &observers_; }
81 84
82 private: 85 private:
(...skipping 14 matching lines...) Expand all
97 base::ObserverList<DisplayObserver> observers_; 100 base::ObserverList<DisplayObserver> observers_;
98 101
99 int observer_suspend_lock_count_ = 0; 102 int observer_suspend_lock_count_ = 0;
100 103
101 DISALLOW_COPY_AND_ASSIGN(DisplayList); 104 DISALLOW_COPY_AND_ASSIGN(DisplayList);
102 }; 105 };
103 106
104 } // namespace display 107 } // namespace display
105 108
106 #endif // UI_DISPLAY_DISPLAY_LIST_H_ 109 #endif // UI_DISPLAY_DISPLAY_LIST_H_
OLDNEW
« no previous file with comments | « ash/wm/window_state_unittest.cc ('k') | ui/display/display_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698