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

Side by Side Diff: third_party/WebKit/Source/core/page/NetworkStateNotifier.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 }; 135 };
136 136
137 const int kInvalidMaxBandwidth = -1; 137 const int kInvalidMaxBandwidth = -1;
138 138
139 void setWebConnectionImpl(WebConnectionType, double maxBandwidthMbps); 139 void setWebConnectionImpl(WebConnectionType, double maxBandwidthMbps);
140 void setMaxBandwidthImpl(double maxBandwidthMbps); 140 void setMaxBandwidthImpl(double maxBandwidthMbps);
141 141
142 // The ObserverListMap is cross-thread accessed, adding/removing Observers r unning 142 // The ObserverListMap is cross-thread accessed, adding/removing Observers r unning
143 // within an ExecutionContext. Kept off-heap to ease cross-thread allocation and use; 143 // within an ExecutionContext. Kept off-heap to ease cross-thread allocation and use;
144 // the observers are (already) responsible for explicitly unregistering whil e finalizing. 144 // the observers are (already) responsible for explicitly unregistering whil e finalizing.
145 using ObserverListMap = HashMap<RawPtrWillBeUntracedMember<ExecutionContext> , OwnPtr<ObserverList>>; 145 using ObserverListMap = HashMap<UntracedMember<ExecutionContext>, OwnPtr<Obs erverList>>;
146 146
147 void notifyObserversOfConnectionChangeOnContext(WebConnectionType, double ma xBandwidthMbps, ExecutionContext*); 147 void notifyObserversOfConnectionChangeOnContext(WebConnectionType, double ma xBandwidthMbps, ExecutionContext*);
148 148
149 ObserverList* lockAndFindObserverList(ExecutionContext*); 149 ObserverList* lockAndFindObserverList(ExecutionContext*);
150 150
151 // Removed observers are nulled out in the list in case the list is being 151 // Removed observers are nulled out in the list in case the list is being
152 // iterated over. Once done iterating, call this to clean up nulled 152 // iterated over. Once done iterating, call this to clean up nulled
153 // observers. 153 // observers.
154 void collectZeroedObservers(ObserverList*, ExecutionContext*); 154 void collectZeroedObservers(ObserverList*, ExecutionContext*);
155 155
156 mutable Mutex m_mutex; 156 mutable Mutex m_mutex;
157 bool m_initialized; 157 bool m_initialized;
158 bool m_isOnLine; 158 bool m_isOnLine;
159 WebConnectionType m_type; 159 WebConnectionType m_type;
160 double m_maxBandwidthMbps; 160 double m_maxBandwidthMbps;
161 ObserverListMap m_observers; 161 ObserverListMap m_observers;
162 bool m_testUpdatesOnly; 162 bool m_testUpdatesOnly;
163 }; 163 };
164 164
165 CORE_EXPORT NetworkStateNotifier& networkStateNotifier(); 165 CORE_EXPORT NetworkStateNotifier& networkStateNotifier();
166 166
167 } // namespace blink 167 } // namespace blink
168 168
169 #endif // NetworkStateNotifier_h 169 #endif // NetworkStateNotifier_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/FrameTree.cpp ('k') | third_party/WebKit/Source/core/page/NetworkStateNotifierTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698