|
Lines 171-191
public:
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec1
|
| 171 |
|
171 |
|
| 172 |
static ExceededDatabaseQuotaRecords& shared(); |
172 |
static ExceededDatabaseQuotaRecords& shared(); |
| 173 |
|
173 |
|
| 174 |
PassOwnPtr<Record> createRecord(uint64_t frameID, String originIdentifier, |
174 |
std::unique_ptr<Record> createRecord(uint64_t frameID, String originIdentifier, |
| 175 |
String databaseName, String displayName, uint64_t currentQuota, |
175 |
String databaseName, String displayName, uint64_t currentQuota, |
| 176 |
uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, |
176 |
uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, |
| 177 |
PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>); |
177 |
PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>); |
| 178 |
|
178 |
|
| 179 |
void add(PassOwnPtr<Record>); |
179 |
void add(std::unique_ptr<Record>); |
| 180 |
bool areBeingProcessed() const { return m_currentRecord; } |
180 |
bool areBeingProcessed() const { return !!m_currentRecord; } |
| 181 |
Record* next(); |
181 |
Record* next(); |
| 182 |
|
182 |
|
| 183 |
private: |
183 |
private: |
| 184 |
ExceededDatabaseQuotaRecords() { } |
184 |
ExceededDatabaseQuotaRecords() { } |
| 185 |
~ExceededDatabaseQuotaRecords() { } |
185 |
~ExceededDatabaseQuotaRecords() { } |
| 186 |
|
186 |
|
| 187 |
Deque<OwnPtr<Record>> m_records; |
187 |
Deque<std::unique_ptr<Record>> m_records; |
| 188 |
OwnPtr<Record> m_currentRecord; |
188 |
std::unique_ptr<Record> m_currentRecord; |
| 189 |
}; |
189 |
}; |
| 190 |
|
190 |
|
| 191 |
ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared() |
191 |
ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared() |
|
Lines 194-205
ExceededDatabaseQuotaRecords& ExceededDa
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec2
|
| 194 |
return records; |
194 |
return records; |
| 195 |
} |
195 |
} |
| 196 |
|
196 |
|
| 197 |
PassOwnPtr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::createRecord( |
197 |
std::unique_ptr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::createRecord( |
| 198 |
uint64_t frameID, String originIdentifier, String databaseName, String displayName, |
198 |
uint64_t frameID, String originIdentifier, String databaseName, String displayName, |
| 199 |
uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, |
199 |
uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, |
| 200 |
uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply) |
200 |
uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply) |
| 201 |
{ |
201 |
{ |
| 202 |
OwnPtr<Record> record = adoptPtr(new Record); |
202 |
auto record = std::make_unique<Record>(); |
| 203 |
record->frameID = frameID; |
203 |
record->frameID = frameID; |
| 204 |
record->originIdentifier = originIdentifier; |
204 |
record->originIdentifier = originIdentifier; |
| 205 |
record->databaseName = databaseName; |
205 |
record->databaseName = databaseName; |
|
Lines 209-225
PassOwnPtr<ExceededDatabaseQuotaRecords:
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec3
|
| 209 |
record->currentDatabaseUsage = currentDatabaseUsage; |
209 |
record->currentDatabaseUsage = currentDatabaseUsage; |
| 210 |
record->expectedUsage = expectedUsage; |
210 |
record->expectedUsage = expectedUsage; |
| 211 |
record->reply = reply; |
211 |
record->reply = reply; |
| 212 |
return record.release(); |
212 |
return std::move(record); |
| 213 |
} |
213 |
} |
| 214 |
|
214 |
|
| 215 |
void ExceededDatabaseQuotaRecords::add(PassOwnPtr<ExceededDatabaseQuotaRecords::Record> record) |
215 |
void ExceededDatabaseQuotaRecords::add(std::unique_ptr<ExceededDatabaseQuotaRecords::Record> record) |
| 216 |
{ |
216 |
{ |
| 217 |
m_records.append(record); |
217 |
m_records.append(std::move(record)); |
| 218 |
} |
218 |
} |
| 219 |
|
219 |
|
| 220 |
ExceededDatabaseQuotaRecords::Record* ExceededDatabaseQuotaRecords::next() |
220 |
ExceededDatabaseQuotaRecords::Record* ExceededDatabaseQuotaRecords::next() |
| 221 |
{ |
221 |
{ |
| 222 |
m_currentRecord.clear(); |
222 |
m_currentRecord = nullptr; |
| 223 |
if (!m_records.isEmpty()) |
223 |
if (!m_records.isEmpty()) |
| 224 |
m_currentRecord = m_records.takeFirst(); |
224 |
m_currentRecord = m_records.takeFirst(); |
| 225 |
return m_currentRecord.get(); |
225 |
return m_currentRecord.get(); |
|
Lines 1264-1270
void WebPageProxy::handleMouseEvent(cons
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec4
|
| 1264 |
m_process->responsivenessTimer()->start(); |
1264 |
m_process->responsivenessTimer()->start(); |
| 1265 |
else { |
1265 |
else { |
| 1266 |
if (m_processingMouseMoveEvent) { |
1266 |
if (m_processingMouseMoveEvent) { |
| 1267 |
m_nextMouseMoveEvent = adoptPtr(new NativeWebMouseEvent(event)); |
1267 |
m_nextMouseMoveEvent = std::make_unique<NativeWebMouseEvent>(event); |
| 1268 |
return; |
1268 |
return; |
| 1269 |
} |
1269 |
} |
| 1270 |
|
1270 |
|
|
Lines 1276-1282
void WebPageProxy::handleMouseEvent(cons
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec5
|
| 1276 |
// we fake a mouse up event by using this stored down event. This event gets cleared |
1276 |
// we fake a mouse up event by using this stored down event. This event gets cleared |
| 1277 |
// when the mouse up message is received from WebProcess. |
1277 |
// when the mouse up message is received from WebProcess. |
| 1278 |
if (event.type() == WebEvent::MouseDown) |
1278 |
if (event.type() == WebEvent::MouseDown) |
| 1279 |
m_currentlyProcessedMouseDownEvent = adoptPtr(new NativeWebMouseEvent(event)); |
1279 |
m_currentlyProcessedMouseDownEvent = std::make_unique<NativeWebMouseEvent>(event); |
| 1280 |
|
1280 |
|
| 1281 |
if (m_shouldSendEventsSynchronously) { |
1281 |
if (m_shouldSendEventsSynchronously) { |
| 1282 |
bool handled = false; |
1282 |
bool handled = false; |
|
Lines 1372-1388
void WebPageProxy::handleWheelEvent(cons
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec6
|
| 1372 |
return; |
1372 |
return; |
| 1373 |
} |
1373 |
} |
| 1374 |
|
1374 |
|
| 1375 |
OwnPtr<Vector<NativeWebWheelEvent>> coalescedWheelEvent = adoptPtr(new Vector<NativeWebWheelEvent>); |
1375 |
auto coalescedWheelEvent = std::make_unique<Vector<NativeWebWheelEvent>>(); |
| 1376 |
coalescedWheelEvent->append(event); |
1376 |
coalescedWheelEvent->append(event); |
| 1377 |
m_currentlyProcessedWheelEvents.append(coalescedWheelEvent.release()); |
1377 |
m_currentlyProcessedWheelEvents.append(std::move(coalescedWheelEvent)); |
| 1378 |
sendWheelEvent(event); |
1378 |
sendWheelEvent(event); |
| 1379 |
} |
1379 |
} |
| 1380 |
|
1380 |
|
| 1381 |
void WebPageProxy::processNextQueuedWheelEvent() |
1381 |
void WebPageProxy::processNextQueuedWheelEvent() |
| 1382 |
{ |
1382 |
{ |
| 1383 |
OwnPtr<Vector<NativeWebWheelEvent>> nextCoalescedEvent = adoptPtr(new Vector<NativeWebWheelEvent>); |
1383 |
auto nextCoalescedEvent = std::make_unique<Vector<NativeWebWheelEvent>>(); |
| 1384 |
WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get()); |
1384 |
WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get()); |
| 1385 |
m_currentlyProcessedWheelEvents.append(nextCoalescedEvent.release()); |
1385 |
m_currentlyProcessedWheelEvents.append(std::move(nextCoalescedEvent)); |
| 1386 |
sendWheelEvent(nextWheelEvent); |
1386 |
sendWheelEvent(nextWheelEvent); |
| 1387 |
} |
1387 |
} |
| 1388 |
|
1388 |
|
|
Lines 3787-3793
void WebPageProxy::didReceiveEvent(uint3
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec7
|
| 3787 |
case WebEvent::Wheel: { |
3787 |
case WebEvent::Wheel: { |
| 3788 |
MESSAGE_CHECK(!m_currentlyProcessedWheelEvents.isEmpty()); |
3788 |
MESSAGE_CHECK(!m_currentlyProcessedWheelEvents.isEmpty()); |
| 3789 |
|
3789 |
|
| 3790 |
OwnPtr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst(); |
3790 |
std::unique_ptr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst(); |
| 3791 |
|
3791 |
|
| 3792 |
// FIXME: Dispatch additional events to the didNotHandleWheelEvent client function. |
3792 |
// FIXME: Dispatch additional events to the didNotHandleWheelEvent client function. |
| 3793 |
if (!handled) { |
3793 |
if (!handled) { |
|
Lines 4301-4310
void WebPageProxy::didReceiveAuthenticat
Source/WebKit2/UIProcess/WebPageProxy.cpp_sec8
|
| 4301 |
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) |
4301 |
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) |
| 4302 |
{ |
4302 |
{ |
| 4303 |
ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared(); |
4303 |
ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared(); |
| 4304 |
OwnPtr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID, |
4304 |
std::unique_ptr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID, |
| 4305 |
originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, |
4305 |
originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, |
| 4306 |
currentDatabaseUsage, expectedUsage, reply); |
4306 |
currentDatabaseUsage, expectedUsage, reply); |
| 4307 |
records.add(newRecord.release()); |
4307 |
records.add(std::move(newRecord)); |
| 4308 |
|
4308 |
|
| 4309 |
if (records.areBeingProcessed()) |
4309 |
if (records.areBeingProcessed()) |
| 4310 |
return; |
4310 |
return; |