|
Lines 170-190
public:
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec1
|
| 170 |
|
170 |
|
| 171 |
static ExceededDatabaseQuotaRecords& shared(); |
171 |
static ExceededDatabaseQuotaRecords& shared(); |
| 172 |
|
172 |
|
| 173 |
PassOwnPtr<Record> createRecord(uint64_t frameID, String originIdentifier, |
173 |
std::unique_ptr<Record> createRecord(uint64_t frameID, String originIdentifier, |
| 174 |
String databaseName, String displayName, uint64_t currentQuota, |
174 |
String databaseName, String displayName, uint64_t currentQuota, |
| 175 |
uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, |
175 |
uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, |
| 176 |
PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>); |
176 |
PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>); |
| 177 |
|
177 |
|
| 178 |
void add(PassOwnPtr<Record>); |
178 |
void add(std::unique_ptr<Record>); |
| 179 |
bool areBeingProcessed() const { return m_currentRecord; } |
179 |
bool areBeingProcessed() const { return !!m_currentRecord; } |
| 180 |
Record* next(); |
180 |
Record* next(); |
| 181 |
|
181 |
|
| 182 |
private: |
182 |
private: |
| 183 |
ExceededDatabaseQuotaRecords() { } |
183 |
ExceededDatabaseQuotaRecords() { } |
| 184 |
~ExceededDatabaseQuotaRecords() { } |
184 |
~ExceededDatabaseQuotaRecords() { } |
| 185 |
|
185 |
|
| 186 |
Deque<OwnPtr<Record>> m_records; |
186 |
Deque<std::unique_ptr<Record>> m_records; |
| 187 |
OwnPtr<Record> m_currentRecord; |
187 |
std::unique_ptr<Record> m_currentRecord; |
| 188 |
}; |
188 |
}; |
| 189 |
|
189 |
|
| 190 |
ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared() |
190 |
ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared() |
|
Lines 193-204
ExceededDatabaseQuotaRecords& ExceededDa
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec2
|
| 193 |
return records; |
193 |
return records; |
| 194 |
} |
194 |
} |
| 195 |
|
195 |
|
| 196 |
PassOwnPtr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::createRecord( |
196 |
std::unique_ptr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::createRecord( |
| 197 |
uint64_t frameID, String originIdentifier, String databaseName, String displayName, |
197 |
uint64_t frameID, String originIdentifier, String databaseName, String displayName, |
| 198 |
uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, |
198 |
uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, |
| 199 |
uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply) |
199 |
uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply) |
| 200 |
{ |
200 |
{ |
| 201 |
OwnPtr<Record> record = adoptPtr(new Record); |
201 |
auto record = std::make_unique<Record>(); |
| 202 |
record->frameID = frameID; |
202 |
record->frameID = frameID; |
| 203 |
record->originIdentifier = originIdentifier; |
203 |
record->originIdentifier = originIdentifier; |
| 204 |
record->databaseName = databaseName; |
204 |
record->databaseName = databaseName; |
|
Lines 208-224
PassOwnPtr<ExceededDatabaseQuotaRecords:
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec3
|
| 208 |
record->currentDatabaseUsage = currentDatabaseUsage; |
208 |
record->currentDatabaseUsage = currentDatabaseUsage; |
| 209 |
record->expectedUsage = expectedUsage; |
209 |
record->expectedUsage = expectedUsage; |
| 210 |
record->reply = reply; |
210 |
record->reply = reply; |
| 211 |
return record.release(); |
211 |
return std::move(record); |
| 212 |
} |
212 |
} |
| 213 |
|
213 |
|
| 214 |
void ExceededDatabaseQuotaRecords::add(PassOwnPtr<ExceededDatabaseQuotaRecords::Record> record) |
214 |
void ExceededDatabaseQuotaRecords::add(std::unique_ptr<ExceededDatabaseQuotaRecords::Record> record) |
| 215 |
{ |
215 |
{ |
| 216 |
m_records.append(record); |
216 |
m_records.append(std::move(record)); |
| 217 |
} |
217 |
} |
| 218 |
|
218 |
|
| 219 |
ExceededDatabaseQuotaRecords::Record* ExceededDatabaseQuotaRecords::next() |
219 |
ExceededDatabaseQuotaRecords::Record* ExceededDatabaseQuotaRecords::next() |
| 220 |
{ |
220 |
{ |
| 221 |
m_currentRecord.clear(); |
221 |
m_currentRecord = nullptr; |
| 222 |
if (!m_records.isEmpty()) |
222 |
if (!m_records.isEmpty()) |
| 223 |
m_currentRecord = m_records.takeFirst(); |
223 |
m_currentRecord = m_records.takeFirst(); |
| 224 |
return m_currentRecord.get(); |
224 |
return m_currentRecord.get(); |
|
Lines 1215-1221
void WebPageProxy::handleMouseEvent(cons
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec4
|
| 1215 |
m_process->responsivenessTimer()->start(); |
1215 |
m_process->responsivenessTimer()->start(); |
| 1216 |
else { |
1216 |
else { |
| 1217 |
if (m_processingMouseMoveEvent) { |
1217 |
if (m_processingMouseMoveEvent) { |
| 1218 |
m_nextMouseMoveEvent = adoptPtr(new NativeWebMouseEvent(event)); |
1218 |
m_nextMouseMoveEvent = std::make_unique<NativeWebMouseEvent>(event); |
| 1219 |
return; |
1219 |
return; |
| 1220 |
} |
1220 |
} |
| 1221 |
|
1221 |
|
|
Lines 1227-1233
void WebPageProxy::handleMouseEvent(cons
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec5
|
| 1227 |
// we fake a mouse up event by using this stored down event. This event gets cleared |
1227 |
// we fake a mouse up event by using this stored down event. This event gets cleared |
| 1228 |
// when the mouse up message is received from WebProcess. |
1228 |
// when the mouse up message is received from WebProcess. |
| 1229 |
if (event.type() == WebEvent::MouseDown) |
1229 |
if (event.type() == WebEvent::MouseDown) |
| 1230 |
m_currentlyProcessedMouseDownEvent = adoptPtr(new NativeWebMouseEvent(event)); |
1230 |
m_currentlyProcessedMouseDownEvent = std::make_unique<NativeWebMouseEvent>(event); |
| 1231 |
|
1231 |
|
| 1232 |
if (m_shouldSendEventsSynchronously) { |
1232 |
if (m_shouldSendEventsSynchronously) { |
| 1233 |
bool handled = false; |
1233 |
bool handled = false; |
|
Lines 1323-1339
void WebPageProxy::handleWheelEvent(cons
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec6
|
| 1323 |
return; |
1323 |
return; |
| 1324 |
} |
1324 |
} |
| 1325 |
|
1325 |
|
| 1326 |
OwnPtr<Vector<NativeWebWheelEvent>> coalescedWheelEvent = adoptPtr(new Vector<NativeWebWheelEvent>); |
1326 |
auto coalescedWheelEvent = std::make_unique<Vector<NativeWebWheelEvent>>(); |
| 1327 |
coalescedWheelEvent->append(event); |
1327 |
coalescedWheelEvent->append(event); |
| 1328 |
m_currentlyProcessedWheelEvents.append(coalescedWheelEvent.release()); |
1328 |
m_currentlyProcessedWheelEvents.append(std::move(coalescedWheelEvent)); |
| 1329 |
sendWheelEvent(event); |
1329 |
sendWheelEvent(event); |
| 1330 |
} |
1330 |
} |
| 1331 |
|
1331 |
|
| 1332 |
void WebPageProxy::processNextQueuedWheelEvent() |
1332 |
void WebPageProxy::processNextQueuedWheelEvent() |
| 1333 |
{ |
1333 |
{ |
| 1334 |
OwnPtr<Vector<NativeWebWheelEvent>> nextCoalescedEvent = adoptPtr(new Vector<NativeWebWheelEvent>); |
1334 |
auto nextCoalescedEvent = std::make_unique<Vector<NativeWebWheelEvent>>(); |
| 1335 |
WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get()); |
1335 |
WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get()); |
| 1336 |
m_currentlyProcessedWheelEvents.append(nextCoalescedEvent.release()); |
1336 |
m_currentlyProcessedWheelEvents.append(std::move(nextCoalescedEvent)); |
| 1337 |
sendWheelEvent(nextWheelEvent); |
1337 |
sendWheelEvent(nextWheelEvent); |
| 1338 |
} |
1338 |
} |
| 1339 |
|
1339 |
|
|
Lines 3658-3664
void WebPageProxy::didReceiveEvent(uint3
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec7
|
| 3658 |
case WebEvent::Wheel: { |
3658 |
case WebEvent::Wheel: { |
| 3659 |
ASSERT(!m_currentlyProcessedWheelEvents.isEmpty()); |
3659 |
ASSERT(!m_currentlyProcessedWheelEvents.isEmpty()); |
| 3660 |
|
3660 |
|
| 3661 |
OwnPtr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst(); |
3661 |
std::unique_ptr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst(); |
| 3662 |
|
3662 |
|
| 3663 |
// FIXME: Dispatch additional events to the didNotHandleWheelEvent client function. |
3663 |
// FIXME: Dispatch additional events to the didNotHandleWheelEvent client function. |
| 3664 |
if (!handled) { |
3664 |
if (!handled) { |
|
Lines 4162-4171
void WebPageProxy::didReceiveAuthenticat
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec8
|
| 4162 |
void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply) |
4162 |
void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply) |
| 4163 |
{ |
4163 |
{ |
| 4164 |
ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared(); |
4164 |
ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared(); |
| 4165 |
OwnPtr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID, |
4165 |
std::unique_ptr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID, |
| 4166 |
originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, |
4166 |
originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, |
| 4167 |
currentDatabaseUsage, expectedUsage, reply); |
4167 |
currentDatabaseUsage, expectedUsage, reply); |
| 4168 |
records.add(newRecord.release()); |
4168 |
records.add(std::move(newRecord)); |
| 4169 |
|
4169 |
|
| 4170 |
if (records.areBeingProcessed()) |
4170 |
if (records.areBeingProcessed()) |
| 4171 |
return; |
4171 |
return; |