|
Lines 170-190
public:
a/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& ExceededDatabaseQuotaRecords::shared()
a/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::Record> ExceededDatabaseQuotaRecords::c
a/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 1181-1187
void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent& event)
a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec4
|
| 1181 |
m_process->responsivenessTimer()->start(); |
1181 |
m_process->responsivenessTimer()->start(); |
| 1182 |
else { |
1182 |
else { |
| 1183 |
if (m_processingMouseMoveEvent) { |
1183 |
if (m_processingMouseMoveEvent) { |
| 1184 |
m_nextMouseMoveEvent = adoptPtr(new NativeWebMouseEvent(event)); |
1184 |
m_nextMouseMoveEvent = std::make_unique<NativeWebMouseEvent>(event); |
| 1185 |
return; |
1185 |
return; |
| 1186 |
} |
1186 |
} |
| 1187 |
|
1187 |
|
|
Lines 1193-1199
void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent& event)
a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec5
|
| 1193 |
// we fake a mouse up event by using this stored down event. This event gets cleared |
1193 |
// we fake a mouse up event by using this stored down event. This event gets cleared |
| 1194 |
// when the mouse up message is received from WebProcess. |
1194 |
// when the mouse up message is received from WebProcess. |
| 1195 |
if (event.type() == WebEvent::MouseDown) |
1195 |
if (event.type() == WebEvent::MouseDown) |
| 1196 |
m_currentlyProcessedMouseDownEvent = adoptPtr(new NativeWebMouseEvent(event)); |
1196 |
m_currentlyProcessedMouseDownEvent = std::make_unique<NativeWebMouseEvent>(event); |
| 1197 |
|
1197 |
|
| 1198 |
if (m_shouldSendEventsSynchronously) { |
1198 |
if (m_shouldSendEventsSynchronously) { |
| 1199 |
bool handled = false; |
1199 |
bool handled = false; |
|
Lines 1289-1305
void WebPageProxy::handleWheelEvent(const NativeWebWheelEvent& event)
a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec6
|
| 1289 |
return; |
1289 |
return; |
| 1290 |
} |
1290 |
} |
| 1291 |
|
1291 |
|
| 1292 |
OwnPtr<Vector<NativeWebWheelEvent>> coalescedWheelEvent = adoptPtr(new Vector<NativeWebWheelEvent>); |
1292 |
auto coalescedWheelEvent = std::make_unique<Vector<NativeWebWheelEvent>>(); |
| 1293 |
coalescedWheelEvent->append(event); |
1293 |
coalescedWheelEvent->append(event); |
| 1294 |
m_currentlyProcessedWheelEvents.append(coalescedWheelEvent.release()); |
1294 |
m_currentlyProcessedWheelEvents.append(std::move(coalescedWheelEvent)); |
| 1295 |
sendWheelEvent(event); |
1295 |
sendWheelEvent(event); |
| 1296 |
} |
1296 |
} |
| 1297 |
|
1297 |
|
| 1298 |
void WebPageProxy::processNextQueuedWheelEvent() |
1298 |
void WebPageProxy::processNextQueuedWheelEvent() |
| 1299 |
{ |
1299 |
{ |
| 1300 |
OwnPtr<Vector<NativeWebWheelEvent>> nextCoalescedEvent = adoptPtr(new Vector<NativeWebWheelEvent>); |
1300 |
auto nextCoalescedEvent = std::make_unique<Vector<NativeWebWheelEvent>>(); |
| 1301 |
WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get()); |
1301 |
WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get()); |
| 1302 |
m_currentlyProcessedWheelEvents.append(nextCoalescedEvent.release()); |
1302 |
m_currentlyProcessedWheelEvents.append(std::move(nextCoalescedEvent)); |
| 1303 |
sendWheelEvent(nextWheelEvent); |
1303 |
sendWheelEvent(nextWheelEvent); |
| 1304 |
} |
1304 |
} |
| 1305 |
|
1305 |
|
|
Lines 3600-3606
void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec7
|
| 3600 |
case WebEvent::Wheel: { |
3600 |
case WebEvent::Wheel: { |
| 3601 |
ASSERT(!m_currentlyProcessedWheelEvents.isEmpty()); |
3601 |
ASSERT(!m_currentlyProcessedWheelEvents.isEmpty()); |
| 3602 |
|
3602 |
|
| 3603 |
OwnPtr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst(); |
3603 |
std::unique_ptr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst(); |
| 3604 |
|
3604 |
|
| 3605 |
// FIXME: Dispatch additional events to the didNotHandleWheelEvent client function. |
3605 |
// FIXME: Dispatch additional events to the didNotHandleWheelEvent client function. |
| 3606 |
if (!handled) { |
3606 |
if (!handled) { |
|
Lines 4052-4061
void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t frameID, Pass
a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec8
|
| 4052 |
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) |
4052 |
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) |
| 4053 |
{ |
4053 |
{ |
| 4054 |
ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared(); |
4054 |
ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared(); |
| 4055 |
OwnPtr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID, |
4055 |
std::unique_ptr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID, |
| 4056 |
originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, |
4056 |
originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, |
| 4057 |
currentDatabaseUsage, expectedUsage, reply); |
4057 |
currentDatabaseUsage, expectedUsage, reply); |
| 4058 |
records.add(newRecord.release()); |
4058 |
records.add(std::move(newRecord)); |
| 4059 |
|
4059 |
|
| 4060 |
if (records.areBeingProcessed()) |
4060 |
if (records.areBeingProcessed()) |
| 4061 |
return; |
4061 |
return; |