| Differences between
and this patch
- Source/WebKit2/ChangeLog +89 lines
Lines 1-3 Source/WebKit2/ChangeLog_sec1
1
2014-04-25  Zan Dobersek  <zdobersek@igalia.com>
2
3
        Move cross-port WebKit2 code to std::unique_ptr
4
        https://bugs.webkit.org/show_bug.cgi?id=129670
5
6
        Reviewed by Darin Adler.
7
8
        Replace uses of OwnPtr, PassOwnPtr in cross-port WebKit2 code with std::unique_ptr.
9
10
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
11
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
12
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
13
        * NetworkProcess/NetworkProcess.h:
14
        (WebKit::NetworkProcess::addSupplement):
15
        * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
16
        (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
17
        * NetworkProcess/SynchronousNetworkLoaderClient.h:
18
        * Platform/IPC/Connection.cpp:
19
        (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
20
        * Platform/IPC/Connection.h:
21
        * Platform/IPC/MessageReceiver.h:
22
        * Platform/Module.h:
23
        * Platform/WorkQueue.h:
24
        * Platform/efl/ModuleEfl.cpp:
25
        (WebKit::Module::load):
26
        * Platform/mac/LayerHostingContext.mm:
27
        * Shared/APIURL.h:
28
        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
29
        * Shared/Plugins/NPRemoteObjectMap.cpp:
30
        * Shared/ShareableBitmap.h:
31
        * UIProcess/DrawingAreaProxyImpl.h:
32
        * UIProcess/InspectorServer/WebSocketServer.cpp:
33
        (WebKit::WebSocketServer::didAcceptConnection):
34
        (WebKit::WebSocketServer::didCloseWebSocketServerConnection):
35
        * UIProcess/InspectorServer/WebSocketServer.h:
36
        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
37
        (WebKit::connectionCallback):
38
        * UIProcess/Network/NetworkProcessProxy.cpp:
39
        (WebKit::NetworkProcessProxy::createDownloadProxy):
40
        * UIProcess/Network/NetworkProcessProxy.h:
41
        * UIProcess/Notifications/WebNotificationManagerProxy.h:
42
        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
43
        (WebKit::WebPluginSiteDataManager::getSitesWithData):
44
        (WebKit::WebPluginSiteDataManager::clearSiteData):
45
        (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
46
        (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
47
        * UIProcess/Plugins/WebPluginSiteDataManager.h:
48
        * UIProcess/Storage/StorageManager.cpp:
49
        (WebKit::callCallbackFunction):
50
        (WebKit::StorageManager::getOriginsInternal):
51
        * UIProcess/WebPageProxy.cpp:
52
        (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
53
        (WebKit::ExceededDatabaseQuotaRecords::createRecord):
54
        (WebKit::ExceededDatabaseQuotaRecords::add):
55
        (WebKit::ExceededDatabaseQuotaRecords::next):
56
        (WebKit::WebPageProxy::handleMouseEvent):
57
        (WebKit::WebPageProxy::handleWheelEvent):
58
        (WebKit::WebPageProxy::processNextQueuedWheelEvent):
59
        (WebKit::WebPageProxy::internalShowContextMenu):
60
        * UIProcess/WebPageProxy.h:
61
        * UIProcess/WebProcessProxy.cpp:
62
        (WebKit::WebProcessProxy::createDownloadProxy):
63
        * UIProcess/WebProcessProxy.h:
64
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
65
        (WebKit::PluginDestructionProtector::PluginDestructionProtector):
66
        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
67
        (WebKit::NetscapePluginStream::deliverData):
68
        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
69
        * WebProcess/Plugins/PluginProcessConnectionManager.h:
70
        * WebProcess/Plugins/PluginProxy.cpp:
71
        (WebKit::PluginProxy::initialize):
72
        (WebKit::PluginProxy::didCreatePluginInternal):
73
        (WebKit::PluginProxy::didFailToCreatePluginInternal):
74
        * WebProcess/Plugins/PluginProxy.h:
75
        * WebProcess/Plugins/PluginView.cpp:
76
        (WebKit::PluginView::createWebEvent):
77
        (WebKit::PluginView::handleEvent):
78
        * WebProcess/Plugins/PluginView.h:
79
        * WebProcess/WebCoreSupport/WebPopupMenu.h:
80
        * WebProcess/WebPage/EventDispatcher.cpp:
81
        (WebKit::EventDispatcher::EventDispatcher):
82
        * WebProcess/WebPage/EventDispatcher.h:
83
        * WebProcess/WebPage/WebPage.cpp:
84
        (WebKit::WebPage::WebPage):
85
        (WebKit::WebPage::beginPrinting):
86
        * WebProcess/WebPage/WebPage.h:
87
        * WebProcess/WebProcess.h:
88
        (WebKit::WebProcess::addSupplement):
89
1
2014-04-25  Dan Bernstein  <mitz@apple.com>
90
2014-04-25  Dan Bernstein  <mitz@apple.com>
2
91
3
        [Cocoa] Synthesized getter for WKNavigationAction's _userInitiated property has the wrong name
92
        [Cocoa] Synthesized getter for WKNavigationAction's _userInitiated property has the wrong name
- Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp -3 / +3 lines
Lines 630-636 bool UniqueIDBDatabaseBackingStoreSQLite Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp_sec1
630
630
631
    m_cursors.set(cursor->identifier(), cursor);
631
    m_cursors.set(cursor->identifier(), cursor);
632
632
633
    OwnPtr<JSLockHolder> locker;
633
    std::unique_ptr<JSLockHolder> locker;
634
    while (!cursor->currentKey().isNull) {
634
    while (!cursor->currentKey().isNull) {
635
        const IDBKeyData& key = cursor->currentKey();
635
        const IDBKeyData& key = cursor->currentKey();
636
        const Vector<uint8_t>& valueBuffer = cursor->currentValueBuffer();
636
        const Vector<uint8_t>& valueBuffer = cursor->currentValueBuffer();
Lines 638-649 bool UniqueIDBDatabaseBackingStoreSQLite Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp_sec2
638
        if (!m_globalObject) {
638
        if (!m_globalObject) {
639
            ASSERT(!m_vm);
639
            ASSERT(!m_vm);
640
            m_vm = VM::create();
640
            m_vm = VM::create();
641
            locker = adoptPtr(new JSLockHolder(m_vm.get()));
641
            locker = std::make_unique<JSLockHolder>(m_vm.get());
642
            m_globalObject.set(*m_vm, JSGlobalObject::create(*m_vm, JSGlobalObject::createStructure(*m_vm, jsNull())));
642
            m_globalObject.set(*m_vm, JSGlobalObject::create(*m_vm, JSGlobalObject::createStructure(*m_vm, jsNull())));
643
        }
643
        }
644
644
645
        if (!locker)
645
        if (!locker)
646
            locker = adoptPtr(new JSLockHolder(m_vm.get()));
646
            locker = std::make_unique<JSLockHolder>(m_vm.get());
647
647
648
        Deprecated::ScriptValue value = deserializeIDBValueBuffer(m_globalObject->globalExec(), valueBuffer, true);
648
        Deprecated::ScriptValue value = deserializeIDBValueBuffer(m_globalObject->globalExec(), valueBuffer, true);
649
        Vector<IDBKeyData> indexKeys;
649
        Vector<IDBKeyData> indexKeys;
- Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h -1 lines
Lines 31-37 Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h_sec1
31
#include "UniqueIDBDatabase.h" 
31
#include "UniqueIDBDatabase.h" 
32
#include "UniqueIDBDatabaseBackingStore.h"
32
#include "UniqueIDBDatabaseBackingStore.h"
33
#include <JavaScriptCore/Strong.h>
33
#include <JavaScriptCore/Strong.h>
34
#include <wtf/OwnPtr.h>
35
#include <wtf/PassRefPtr.h>
34
#include <wtf/PassRefPtr.h>
36
#include <wtf/text/WTFString.h>
35
#include <wtf/text/WTFString.h>
37
36
- Source/WebKit2/NetworkProcess/NetworkProcess.h -2 / +3 lines
Lines 34-39 Source/WebKit2/NetworkProcess/NetworkProcess.h_sec1
34
#include "MessageReceiverMap.h"
34
#include "MessageReceiverMap.h"
35
#include "NetworkResourceLoadScheduler.h"
35
#include "NetworkResourceLoadScheduler.h"
36
#include <WebCore/SessionID.h>
36
#include <WebCore/SessionID.h>
37
#include <memory>
37
#include <wtf/Forward.h>
38
#include <wtf/Forward.h>
38
#include <wtf/NeverDestroyed.h>
39
#include <wtf/NeverDestroyed.h>
39
40
Lines 63-69 public: Source/WebKit2/NetworkProcess/NetworkProcess.h_sec2
63
    template <typename T>
64
    template <typename T>
64
    void addSupplement()
65
    void addSupplement()
65
    {
66
    {
66
        m_supplements.add(T::supplementName(), adoptPtr<NetworkProcessSupplement>(new T(this)));
67
        m_supplements.add(T::supplementName(), std::make_unique<T>(this));
67
    }
68
    }
68
69
69
    void removeNetworkConnectionToWebProcess(NetworkConnectionToWebProcess*);
70
    void removeNetworkConnectionToWebProcess(NetworkConnectionToWebProcess*);
Lines 134-140 private: Source/WebKit2/NetworkProcess/NetworkProcess.h_sec3
134
    bool m_hasSetCacheModel;
135
    bool m_hasSetCacheModel;
135
    CacheModel m_cacheModel;
136
    CacheModel m_cacheModel;
136
137
137
    typedef HashMap<const char*, OwnPtr<NetworkProcessSupplement>, PtrHash<const char*>> NetworkProcessSupplementMap;
138
    typedef HashMap<const char*, std::unique_ptr<NetworkProcessSupplement>, PtrHash<const char*>> NetworkProcessSupplementMap;
138
    NetworkProcessSupplementMap m_supplements;
139
    NetworkProcessSupplementMap m_supplements;
139
140
140
#if PLATFORM(COCOA)
141
#if PLATFORM(COCOA)
- Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.cpp -1 / +1 lines
Lines 88-94 void SynchronousNetworkLoaderClient::did Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.cpp_sec1
88
    // It's unclear if the potential complexities of that approach are worth it.
88
    // It's unclear if the potential complexities of that approach are worth it.
89
    
89
    
90
    if (!m_responseData)
90
    if (!m_responseData)
91
        m_responseData = adoptPtr(new Vector<char>);
91
        m_responseData = std::make_unique<Vector<char>>();
92
92
93
    m_responseData->append(buffer->data(), buffer->size());
93
    m_responseData->append(buffer->data(), buffer->size());
94
}
94
}
- Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h -1 / +2 lines
Lines 31-36 Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h_sec1
31
#include <WebCore/ResourceError.h>
31
#include <WebCore/ResourceError.h>
32
#include <WebCore/ResourceRequest.h>
32
#include <WebCore/ResourceRequest.h>
33
#include <WebCore/ResourceResponse.h>
33
#include <WebCore/ResourceResponse.h>
34
#include <memory>
34
#include <wtf/RefCounted.h>
35
#include <wtf/RefCounted.h>
35
36
36
#if ENABLE(NETWORK_PROCESS)
37
#if ENABLE(NETWORK_PROCESS)
Lines 66-72 private: Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h_sec2
66
    RefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply> m_delayedReply;
67
    RefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply> m_delayedReply;
67
    WebCore::ResourceResponse m_response;
68
    WebCore::ResourceResponse m_response;
68
    WebCore::ResourceError m_error;
69
    WebCore::ResourceError m_error;
69
    OwnPtr<Vector<char>> m_responseData;
70
    std::unique_ptr<Vector<char>> m_responseData;
70
};
71
};
71
72
72
} // namespace WebKit
73
} // namespace WebKit
- Source/WebKit2/Platform/WorkQueue.h -1 lines
Lines 36-42 Source/WebKit2/Platform/WorkQueue.h_sec1
36
#include <wtf/Forward.h>
36
#include <wtf/Forward.h>
37
#include <wtf/Functional.h>
37
#include <wtf/Functional.h>
38
#include <wtf/HashMap.h>
38
#include <wtf/HashMap.h>
39
#include <wtf/PassOwnPtr.h>
40
#include <wtf/RefCounted.h>
39
#include <wtf/RefCounted.h>
41
#include <wtf/Threading.h>
40
#include <wtf/Threading.h>
42
#include <wtf/Vector.h>
41
#include <wtf/Vector.h>
- Source/WebKit2/Platform/IPC/Connection.cpp -1 / +2 lines
Lines 26-31 Source/WebKit2/Platform/IPC/Connection.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "Connection.h"
27
#include "Connection.h"
28
28
29
#include <memory>
29
#include <wtf/CurrentTime.h>
30
#include <wtf/CurrentTime.h>
30
#include <wtf/HashSet.h>
31
#include <wtf/HashSet.h>
31
#include <wtf/NeverDestroyed.h>
32
#include <wtf/NeverDestroyed.h>
Lines 277-283 void Connection::removeWorkQueueMessageR Source/WebKit2/Platform/IPC/Connection.cpp_sec2
277
278
278
void Connection::dispatchWorkQueueMessageReceiverMessage(WorkQueueMessageReceiver* workQueueMessageReceiver, MessageDecoder* incomingMessageDecoder)
279
void Connection::dispatchWorkQueueMessageReceiverMessage(WorkQueueMessageReceiver* workQueueMessageReceiver, MessageDecoder* incomingMessageDecoder)
279
{
280
{
280
    OwnPtr<MessageDecoder> decoder = adoptPtr(incomingMessageDecoder);
281
    std::unique_ptr<MessageDecoder> decoder(incomingMessageDecoder);
281
282
282
    if (!decoder->isSyncMessage()) {
283
    if (!decoder->isSyncMessage()) {
283
        workQueueMessageReceiver->didReceiveMessage(this, *decoder);
284
        workQueueMessageReceiver->didReceiveMessage(this, *decoder);
- Source/WebKit2/Platform/IPC/Connection.h -1 lines
Lines 38-44 Source/WebKit2/Platform/IPC/Connection.h_sec1
38
#include <wtf/Deque.h>
38
#include <wtf/Deque.h>
39
#include <wtf/Forward.h>
39
#include <wtf/Forward.h>
40
#include <wtf/PassRefPtr.h>
40
#include <wtf/PassRefPtr.h>
41
#include <wtf/OwnPtr.h>
42
#include <wtf/text/CString.h>
41
#include <wtf/text/CString.h>
43
42
44
#if OS(DARWIN)
43
#if OS(DARWIN)
- Source/WebKit2/Platform/IPC/MessageReceiver.h -1 lines
Lines 27-33 Source/WebKit2/Platform/IPC/MessageReceiver.h_sec1
27
#define MessageReceiver_h
27
#define MessageReceiver_h
28
28
29
#include <wtf/Assertions.h>
29
#include <wtf/Assertions.h>
30
#include <wtf/OwnPtr.h>
31
30
32
namespace IPC {
31
namespace IPC {
33
32
- Source/WebKit2/Platform/efl/ModuleEfl.cpp -2 lines
Lines 20-27 Source/WebKit2/Platform/efl/ModuleEfl.cpp_sec1
20
#include "config.h"
20
#include "config.h"
21
#include "Module.h"
21
#include "Module.h"
22
22
23
#include <wtf/OwnPtr.h>
24
#include <wtf/PassOwnPtr.h>
25
#include <wtf/text/CString.h>
23
#include <wtf/text/CString.h>
26
24
27
namespace WebKit {
25
namespace WebKit {
- Source/WebKit2/Platform/mac/LayerHostingContext.mm -1 lines
Lines 26-32 Source/WebKit2/Platform/mac/LayerHostingContext.mm_sec1
26
#import "config.h"
26
#import "config.h"
27
#import "LayerHostingContext.h"
27
#import "LayerHostingContext.h"
28
28
29
#import <wtf/OwnPtr.h>
30
#import <WebKitSystemInterface.h>
29
#import <WebKitSystemInterface.h>
31
30
32
#if __has_include(<QuartzCore/QuartzCorePrivate.h>)
31
#if __has_include(<QuartzCore/QuartzCorePrivate.h>)
- Source/WebKit2/Shared/APIURL.h -2 lines
Lines 29-36 Source/WebKit2/Shared/APIURL.h_sec1
29
#include "APIObject.h"
29
#include "APIObject.h"
30
#include "WebCoreArgumentCoders.h"
30
#include "WebCoreArgumentCoders.h"
31
#include <WebCore/URL.h>
31
#include <WebCore/URL.h>
32
#include <wtf/OwnPtr.h>
33
#include <wtf/PassOwnPtr.h>
34
#include <wtf/PassRefPtr.h>
32
#include <wtf/PassRefPtr.h>
35
#include <wtf/text/WTFString.h>
33
#include <wtf/text/WTFString.h>
36
34
- Source/WebKit2/Shared/ShareableBitmap.h -1 lines
Lines 28-34 Source/WebKit2/Shared/ShareableBitmap.h_sec1
28
28
29
#include "SharedMemory.h"
29
#include "SharedMemory.h"
30
#include <WebCore/IntRect.h>
30
#include <WebCore/IntRect.h>
31
#include <wtf/PassOwnPtr.h>
32
#include <wtf/PassRefPtr.h>
31
#include <wtf/PassRefPtr.h>
33
#include <wtf/RefCounted.h>
32
#include <wtf/RefCounted.h>
34
#include <wtf/RefPtr.h>
33
#include <wtf/RefPtr.h>
- Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h -1 / +2 lines
Lines 40-45 Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h_sec1
40
#include <wtf/RetainPtr.h>
40
#include <wtf/RetainPtr.h>
41
#include <wtf/Threading.h>
41
#include <wtf/Threading.h>
42
OBJC_CLASS WKCustomProtocol;
42
OBJC_CLASS WKCustomProtocol;
43
#else
44
#include "CustomProtocolManagerImpl.h"
43
#endif
45
#endif
44
46
45
47
Lines 55-61 class ResourceResponse; Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h_sec2
55
namespace WebKit {
57
namespace WebKit {
56
58
57
class ChildProcess;
59
class ChildProcess;
58
class CustomProtocolManagerImpl;
59
struct NetworkProcessCreationParameters;
60
struct NetworkProcessCreationParameters;
60
61
61
class CustomProtocolManager : public WebProcessSupplement, public NetworkProcessSupplement, public IPC::Connection::WorkQueueMessageReceiver {
62
class CustomProtocolManager : public WebProcessSupplement, public NetworkProcessSupplement, public IPC::Connection::WorkQueueMessageReceiver {
- Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp -1 lines
Lines 32-38 Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp_sec1
32
#include "NPObjectProxy.h"
32
#include "NPObjectProxy.h"
33
#include "NPRuntimeUtilities.h"
33
#include "NPRuntimeUtilities.h"
34
#include "NPVariantData.h"
34
#include "NPVariantData.h"
35
#include <wtf/OwnPtr.h>
36
35
37
namespace WebKit {
36
namespace WebKit {
38
37
- Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h -1 lines
Lines 29-35 Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h_sec1
29
#include "BackingStore.h"
29
#include "BackingStore.h"
30
#include "DrawingAreaProxy.h"
30
#include "DrawingAreaProxy.h"
31
#include "LayerTreeContext.h"
31
#include "LayerTreeContext.h"
32
#include <wtf/OwnPtr.h>
33
#include <wtf/RunLoop.h>
32
#include <wtf/RunLoop.h>
34
33
35
namespace WebCore {
34
namespace WebCore {
- Source/WebKit2/UIProcess/WebPageProxy.cpp -20 / +20 lines
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;
- Source/WebKit2/UIProcess/WebPageProxy.h -5 / +4 lines
Lines 68-77 Source/WebKit2/UIProcess/WebPageProxy.h_sec1
68
#include <WebCore/TextChecking.h>
68
#include <WebCore/TextChecking.h>
69
#include <WebCore/TextGranularity.h>
69
#include <WebCore/TextGranularity.h>
70
#include <WebCore/ViewState.h>
70
#include <WebCore/ViewState.h>
71
#include <memory>
71
#include <wtf/HashMap.h>
72
#include <wtf/HashMap.h>
72
#include <wtf/HashSet.h>
73
#include <wtf/HashSet.h>
73
#include <wtf/OwnPtr.h>
74
#include <wtf/PassOwnPtr.h>
75
#include <wtf/PassRefPtr.h>
74
#include <wtf/PassRefPtr.h>
76
#include <wtf/Ref.h>
75
#include <wtf/Ref.h>
77
#include <wtf/RefPtr.h>
76
#include <wtf/RefPtr.h>
Lines 1554-1564 private: Source/WebKit2/UIProcess/WebPageProxy.h_sec2
1554
1553
1555
    Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1554
    Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1556
    Deque<NativeWebWheelEvent> m_wheelEventQueue;
1555
    Deque<NativeWebWheelEvent> m_wheelEventQueue;
1557
    Deque<OwnPtr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1556
    Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1558
1557
1559
    bool m_processingMouseMoveEvent;
1558
    bool m_processingMouseMoveEvent;
1560
    OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1559
    std::unique_ptr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1561
    OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1560
    std::unique_ptr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1562
1561
1563
#if ENABLE(TOUCH_EVENTS)
1562
#if ENABLE(TOUCH_EVENTS)
1564
    bool m_isTrackingTouchEvents;
1563
    bool m_isTrackingTouchEvents;
- Source/WebKit2/UIProcess/WebProcessProxy.cpp -1 / +1 lines
Lines 545-551 DownloadProxy* WebProcessProxy::createDo Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec1
545
#endif
545
#endif
546
546
547
    if (!m_downloadProxyMap)
547
    if (!m_downloadProxyMap)
548
        m_downloadProxyMap = adoptPtr(new DownloadProxyMap(this));
548
        m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
549
549
550
    return m_downloadProxyMap->createDownloadProxy(m_context.get());
550
    return m_downloadProxyMap->createDownloadProxy(m_context.get());
551
}
551
}
- Source/WebKit2/UIProcess/WebProcessProxy.h -1 / +2 lines
Lines 37-42 Source/WebKit2/UIProcess/WebProcessProxy.h_sec1
37
#include "WebPageProxy.h"
37
#include "WebPageProxy.h"
38
#include "WebProcessProxyMessages.h"
38
#include "WebProcessProxyMessages.h"
39
#include <WebCore/LinkHash.h>
39
#include <WebCore/LinkHash.h>
40
#include <memory>
40
#include <wtf/Forward.h>
41
#include <wtf/Forward.h>
41
#include <wtf/HashMap.h>
42
#include <wtf/HashMap.h>
42
#include <wtf/PassRefPtr.h>
43
#include <wtf/PassRefPtr.h>
Lines 204-210 private: Source/WebKit2/UIProcess/WebProcessProxy.h_sec2
204
    WebFrameProxyMap m_frameMap;
205
    WebFrameProxyMap m_frameMap;
205
    WebBackForwardListItemMap m_backForwardListItemMap;
206
    WebBackForwardListItemMap m_backForwardListItemMap;
206
207
207
    OwnPtr<DownloadProxyMap> m_downloadProxyMap;
208
    std::unique_ptr<DownloadProxyMap> m_downloadProxyMap;
208
209
209
#if ENABLE(CUSTOM_PROTOCOLS)
210
#if ENABLE(CUSTOM_PROTOCOLS)
210
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
211
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
- Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp -5 / +4 lines
Lines 32-38 Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp_sec1
32
32
33
#include "WebSocketServerConnection.h"
33
#include "WebSocketServerConnection.h"
34
#include <WebCore/SocketStreamHandle.h>
34
#include <WebCore/SocketStreamHandle.h>
35
#include <wtf/PassOwnPtr.h>
36
35
37
using namespace WebCore;
36
using namespace WebCore;
38
37
Lines 78-97 void WebSocketServer::close() Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp_sec2
78
    m_bindAddress = String();
77
    m_bindAddress = String();
79
}
78
}
80
79
81
void WebSocketServer::didAcceptConnection(PassOwnPtr<WebSocketServerConnection> connection)
80
void WebSocketServer::didAcceptConnection(std::unique_ptr<WebSocketServerConnection> connection)
82
{
81
{
83
    m_connections.append(connection);
82
    m_connections.append(std::move(connection));
84
}
83
}
85
84
86
void WebSocketServer::didCloseWebSocketServerConnection(WebSocketServerConnection* connection)
85
void WebSocketServer::didCloseWebSocketServerConnection(WebSocketServerConnection* connection)
87
{
86
{
88
    Deque<OwnPtr<WebSocketServerConnection> >::iterator end = m_connections.end();
87
    for (auto it = m_connections.begin(), end = m_connections.end(); it != end; ++it) {
89
    for (Deque<OwnPtr<WebSocketServerConnection> >::iterator it = m_connections.begin(); it != end; ++it) {
90
        if (it->get() == connection) {
88
        if (it->get() == connection) {
91
            m_connections.remove(it);
89
            m_connections.remove(it);
92
            return;
90
            return;
93
        }
91
        }
94
    }
92
    }
93
95
    ASSERT_NOT_REACHED();
94
    ASSERT_NOT_REACHED();
96
}
95
}
97
96
- Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h -3 / +3 lines
Lines 29-36 Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h_sec1
29
29
30
#if ENABLE(INSPECTOR_SERVER)
30
#if ENABLE(INSPECTOR_SERVER)
31
31
32
#include <memory>
32
#include <wtf/Deque.h>
33
#include <wtf/Deque.h>
33
#include <wtf/OwnPtr.h>
34
#include <wtf/text/WTFString.h>
34
#include <wtf/text/WTFString.h>
35
35
36
#if USE(SOUP)
36
#if USE(SOUP)
Lines 61-67 public: Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h_sec2
61
    void close();
61
    void close();
62
62
63
    WebSocketServerClient* client() const { return m_client; }
63
    WebSocketServerClient* client() const { return m_client; }
64
    void didAcceptConnection(PassOwnPtr<WebSocketServerConnection>);
64
    void didAcceptConnection(std::unique_ptr<WebSocketServerConnection>);
65
65
66
private:
66
private:
67
    void didCloseWebSocketServerConnection(WebSocketServerConnection*);
67
    void didCloseWebSocketServerConnection(WebSocketServerConnection*);
Lines 71-77 private: Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h_sec3
71
    void platformClose();
71
    void platformClose();
72
72
73
    ServerState m_state;
73
    ServerState m_state;
74
    Deque<OwnPtr<WebSocketServerConnection> > m_connections;
74
    Deque<std::unique_ptr<WebSocketServerConnection>> m_connections;
75
    WebSocketServerClient* m_client;
75
    WebSocketServerClient* m_client;
76
    String m_bindAddress;
76
    String m_bindAddress;
77
    unsigned short m_port;
77
    unsigned short m_port;
- Source/WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp -3 / +2 lines
Lines 31-37 Source/WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp_sec1
31
#include <WebCore/SocketStreamHandle.h>
31
#include <WebCore/SocketStreamHandle.h>
32
#include <gio/gio.h>
32
#include <gio/gio.h>
33
#include <glib.h>
33
#include <glib.h>
34
#include <wtf/PassOwnPtr.h>
35
#include <wtf/gobject/GUniquePtr.h>
34
#include <wtf/gobject/GUniquePtr.h>
36
#include <wtf/text/CString.h>
35
#include <wtf/text/CString.h>
37
36
Lines 47-55 static gboolean connectionCallback(GSock Source/WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp_sec2
47
    LOG(InspectorServer, "New Connection from %s:%d.", addressString.get(), g_inet_socket_address_get_port(G_INET_SOCKET_ADDRESS(socketAddress.get())));
46
    LOG(InspectorServer, "New Connection from %s:%d.", addressString.get(), g_inet_socket_address_get_port(G_INET_SOCKET_ADDRESS(socketAddress.get())));
48
#endif
47
#endif
49
48
50
    OwnPtr<WebSocketServerConnection> webSocketConnection = adoptPtr(new WebSocketServerConnection(server->client(), server));
49
    auto webSocketConnection = std::make_unique<WebSocketServerConnection>(server->client(), server);
51
    webSocketConnection->setSocketHandle(SocketStreamHandle::create(connection, webSocketConnection.get()));
50
    webSocketConnection->setSocketHandle(SocketStreamHandle::create(connection, webSocketConnection.get()));
52
    server->didAcceptConnection(webSocketConnection.release());
51
    server->didAcceptConnection(std::move(webSocketConnection));
53
52
54
    return TRUE;
53
    return TRUE;
55
}
54
}
- Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp -1 / +1 lines
Lines 100-106 void NetworkProcessProxy::getNetworkProc Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp_sec1
100
DownloadProxy* NetworkProcessProxy::createDownloadProxy()
100
DownloadProxy* NetworkProcessProxy::createDownloadProxy()
101
{
101
{
102
    if (!m_downloadProxyMap)
102
    if (!m_downloadProxyMap)
103
        m_downloadProxyMap = adoptPtr(new DownloadProxyMap(this));
103
        m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
104
104
105
    return m_downloadProxyMap->createDownloadProxy(m_webContext);
105
    return m_downloadProxyMap->createDownloadProxy(m_webContext);
106
}
106
}
- Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h -1 / +2 lines
Lines 31-36 Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h_sec1
31
#include "ChildProcessProxy.h"
31
#include "ChildProcessProxy.h"
32
#include "ProcessLauncher.h"
32
#include "ProcessLauncher.h"
33
#include "WebProcessProxyMessages.h"
33
#include "WebProcessProxyMessages.h"
34
#include <memory>
34
#include <wtf/Deque.h>
35
#include <wtf/Deque.h>
35
36
36
#if ENABLE(CUSTOM_PROTOCOLS)
37
#if ENABLE(CUSTOM_PROTOCOLS)
Lines 91-97 private: Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h_sec2
91
    unsigned m_numPendingConnectionRequests;
92
    unsigned m_numPendingConnectionRequests;
92
    Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies;
93
    Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies;
93
94
94
    OwnPtr<DownloadProxyMap> m_downloadProxyMap;
95
    std::unique_ptr<DownloadProxyMap> m_downloadProxyMap;
95
96
96
#if ENABLE(CUSTOM_PROTOCOLS)
97
#if ENABLE(CUSTOM_PROTOCOLS)
97
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
98
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
- Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h -1 lines
Lines 32-38 Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h_sec1
32
#include "WebNotificationProvider.h"
32
#include "WebNotificationProvider.h"
33
#include <WebCore/NotificationClient.h>
33
#include <WebCore/NotificationClient.h>
34
#include <wtf/HashMap.h>
34
#include <wtf/HashMap.h>
35
#include <wtf/OwnPtr.h>
36
#include <wtf/PassRefPtr.h>
35
#include <wtf/PassRefPtr.h>
37
#include <wtf/text/StringHash.h>
36
#include <wtf/text/StringHash.h>
38
37
- Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp -4 / +4 lines
Lines 153-159 void WebPluginSiteDataManager::getSitesW Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec1
153
    ASSERT(!m_pendingGetSitesWithData.contains(callbackID));
153
    ASSERT(!m_pendingGetSitesWithData.contains(callbackID));
154
154
155
    GetSitesWithDataState* state = new GetSitesWithDataState(this, callbackID);
155
    GetSitesWithDataState* state = new GetSitesWithDataState(this, callbackID);
156
    m_pendingGetSitesWithData.set(callbackID, adoptPtr(state));
156
    m_pendingGetSitesWithData.set(callbackID, std::unique_ptr<GetSitesWithDataState>(state));
157
    state->getSitesWithDataForNextPlugin();
157
    state->getSitesWithDataForNextPlugin();
158
}
158
}
159
159
Lines 197-203 void WebPluginSiteDataManager::clearSite Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec2
197
    ASSERT(!m_pendingClearSiteData.contains(callbackID));
197
    ASSERT(!m_pendingClearSiteData.contains(callbackID));
198
198
199
    ClearSiteDataState* state = new ClearSiteDataState(this, sitesVector, flags, maxAgeInSeconds, callbackID);
199
    ClearSiteDataState* state = new ClearSiteDataState(this, sitesVector, flags, maxAgeInSeconds, callbackID);
200
    m_pendingClearSiteData.set(callbackID, adoptPtr(state));
200
    m_pendingClearSiteData.set(callbackID, std::unique_ptr<ClearSiteDataState>(state));
201
    state->clearSiteDataForNextPlugin();
201
    state->clearSiteDataForNextPlugin();
202
}
202
}
203
203
Lines 222-228 void WebPluginSiteDataManager::didGetSit Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec3
222
222
223
void WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins(const Vector<String>& sites, uint64_t callbackID)
223
void WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins(const Vector<String>& sites, uint64_t callbackID)
224
{
224
{
225
    OwnPtr<GetSitesWithDataState> state = m_pendingGetSitesWithData.take(callbackID);
225
    std::unique_ptr<GetSitesWithDataState> state = m_pendingGetSitesWithData.take(callbackID);
226
    ASSERT(state);
226
    ASSERT(state);
227
227
228
    didGetSitesWithData(sites, callbackID);
228
    didGetSitesWithData(sites, callbackID);
Lines 238-244 void WebPluginSiteDataManager::didClearS Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec4
238
238
239
void WebPluginSiteDataManager::didClearSiteDataForAllPlugins(uint64_t callbackID)
239
void WebPluginSiteDataManager::didClearSiteDataForAllPlugins(uint64_t callbackID)
240
{
240
{
241
    OwnPtr<ClearSiteDataState> state = m_pendingClearSiteData.take(callbackID);
241
    std::unique_ptr<ClearSiteDataState> state = m_pendingClearSiteData.take(callbackID);
242
    ASSERT(state);
242
    ASSERT(state);
243
243
244
    didClearSiteData(callbackID);
244
    didClearSiteData(callbackID);
- Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h -2 / +3 lines
Lines 31-36 Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h_sec1
31
#include "APIObject.h"
31
#include "APIObject.h"
32
#include "Arguments.h"
32
#include "Arguments.h"
33
#include "GenericCallback.h"
33
#include "GenericCallback.h"
34
#include <memory>
34
#include <wtf/HashMap.h>
35
#include <wtf/HashMap.h>
35
#include <wtf/PassRefPtr.h>
36
#include <wtf/PassRefPtr.h>
36
37
Lines 69-78 private: Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h_sec2
69
    void didClearSiteDataForAllPlugins(uint64_t callbackID);
70
    void didClearSiteDataForAllPlugins(uint64_t callbackID);
70
71
71
    class GetSitesWithDataState;
72
    class GetSitesWithDataState;
72
    HashMap<uint64_t, OwnPtr<GetSitesWithDataState>> m_pendingGetSitesWithData;
73
    HashMap<uint64_t, std::unique_ptr<GetSitesWithDataState>> m_pendingGetSitesWithData;
73
74
74
    class ClearSiteDataState;
75
    class ClearSiteDataState;
75
    HashMap<uint64_t, OwnPtr<ClearSiteDataState>> m_pendingClearSiteData;
76
    HashMap<uint64_t, std::unique_ptr<ClearSiteDataState>> m_pendingClearSiteData;
76
};
77
};
77
78
78
} // namespace WebKit
79
} // namespace WebKit
- Source/WebKit2/UIProcess/Storage/StorageManager.cpp -3 / +4 lines
Lines 37-42 Source/WebKit2/UIProcess/Storage/StorageManager.cpp_sec1
37
#include <WebCore/SecurityOriginHash.h>
37
#include <WebCore/SecurityOriginHash.h>
38
#include <WebCore/StorageMap.h>
38
#include <WebCore/StorageMap.h>
39
#include <WebCore/TextEncoding.h>
39
#include <WebCore/TextEncoding.h>
40
#include <memory>
40
41
41
using namespace WebCore;
42
using namespace WebCore;
42
43
Lines 631-644 StorageManager::LocalStorageNamespace* S Source/WebKit2/UIProcess/Storage/StorageManager.cpp_sec2
631
632
632
static void callCallbackFunction(void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context), Vector<RefPtr<WebCore::SecurityOrigin>>* securityOriginsPtr)
633
static void callCallbackFunction(void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context), Vector<RefPtr<WebCore::SecurityOrigin>>* securityOriginsPtr)
633
{
634
{
634
    OwnPtr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins = adoptPtr(securityOriginsPtr);
635
    std::unique_ptr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins(securityOriginsPtr);
635
    callbackFunction(*securityOrigins, context);
636
    callbackFunction(*securityOrigins, context);
636
}
637
}
637
638
638
void StorageManager::getOriginsInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context))
639
void StorageManager::getOriginsInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context))
639
{
640
{
640
    OwnPtr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins = adoptPtr(new Vector<RefPtr<WebCore::SecurityOrigin>>(m_localStorageDatabaseTracker->origins()));
641
    auto securityOrigins = std::make_unique<Vector<RefPtr<WebCore::SecurityOrigin>>>(m_localStorageDatabaseTracker->origins());
641
    dispatcher->dispatch(bind(callCallbackFunction, context, callbackFunction, securityOrigins.leakPtr()));
642
    dispatcher->dispatch(bind(callCallbackFunction, context, callbackFunction, securityOrigins.release()));
642
}
643
}
643
644
644
void StorageManager::getStorageDetailsByOriginInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<LocalStorageDetails>& storageDetails, void* context))
645
void StorageManager::getStorageDetailsByOriginInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<LocalStorageDetails>& storageDetails, void* context))
- Source/WebKit2/WebProcess/WebProcess.h -2 / +2 lines
Lines 99-105 public: Source/WebKit2/WebProcess/WebProcess.h_sec1
99
    template <typename T>
99
    template <typename T>
100
    void addSupplement()
100
    void addSupplement()
101
    {
101
    {
102
        m_supplements.add(T::supplementName(), adoptPtr<WebProcessSupplement>(new T(this)));
102
        m_supplements.add(T::supplementName(), std::make_unique<T>(this));
103
    }
103
    }
104
104
105
    WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); }
105
    WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); }
Lines 302-308 private: Source/WebKit2/WebProcess/WebProcess.h_sec2
302
302
303
    HashMap<uint64_t, WebFrame*> m_frameMap;
303
    HashMap<uint64_t, WebFrame*> m_frameMap;
304
304
305
    typedef HashMap<const char*, OwnPtr<WebProcessSupplement>, PtrHash<const char*>> WebProcessSupplementMap;
305
    typedef HashMap<const char*, std::unique_ptr<WebProcessSupplement>, PtrHash<const char*>> WebProcessSupplementMap;
306
    WebProcessSupplementMap m_supplements;
306
    WebProcessSupplementMap m_supplements;
307
307
308
    TextCheckerState m_textCheckerState;
308
    TextCheckerState m_textCheckerState;
- Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h -2 lines
Lines 52-59 public: Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h_sec1
52
    PluginProcessConnection* getPluginProcessConnection(uint64_t pluginProcessToken);
52
    PluginProcessConnection* getPluginProcessConnection(uint64_t pluginProcessToken);
53
    void removePluginProcessConnection(PluginProcessConnection*);
53
    void removePluginProcessConnection(PluginProcessConnection*);
54
54
55
    void didReceivePluginProcessConnectionManagerMessageOnConnectionWorkQueue(IPC::Connection*, OwnPtr<IPC::MessageDecoder>&);
56
57
private:
55
private:
58
    PluginProcessConnectionManager();
56
    PluginProcessConnectionManager();
59
57
- Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp -3 / +3 lines
Lines 96-102 bool PluginProxy::initialize(const Param Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec1
96
    m_connection->addPluginProxy(this);
96
    m_connection->addPluginProxy(this);
97
97
98
    // Ask the plug-in process to create a plug-in.
98
    // Ask the plug-in process to create a plug-in.
99
    m_pendingPluginCreationParameters = adoptPtr(new PluginCreationParameters);
99
    m_pendingPluginCreationParameters = std::make_unique<PluginCreationParameters>();
100
100
101
    m_pendingPluginCreationParameters->pluginInstanceID = m_pluginInstanceID;
101
    m_pendingPluginCreationParameters->pluginInstanceID = m_pluginInstanceID;
102
    m_pendingPluginCreationParameters->windowNPObjectID = windowNPObjectID();
102
    m_pendingPluginCreationParameters->windowNPObjectID = windowNPObjectID();
Lines 170-176 void PluginProxy::didCreatePluginInterna Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec2
170
170
171
    // Whether synchronously or asynchronously, this plug-in was created and we shouldn't need to remember
171
    // Whether synchronously or asynchronously, this plug-in was created and we shouldn't need to remember
172
    // anything about how.
172
    // anything about how.
173
    m_pendingPluginCreationParameters.clear();
173
    m_pendingPluginCreationParameters = nullptr;
174
    m_waitingOnAsynchronousInitialization = false;
174
    m_waitingOnAsynchronousInitialization = false;
175
}
175
}
176
176
Lines 184-190 void PluginProxy::didFailToCreatePluginI Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec3
184
184
185
    // Whether synchronously or asynchronously, this plug-in failed to create and we shouldn't need to remember
185
    // Whether synchronously or asynchronously, this plug-in failed to create and we shouldn't need to remember
186
    // anything about how.
186
    // anything about how.
187
    m_pendingPluginCreationParameters.clear();
187
    m_pendingPluginCreationParameters = nullptr;
188
    m_waitingOnAsynchronousInitialization = false;
188
    m_waitingOnAsynchronousInitialization = false;
189
}
189
}
190
190
- Source/WebKit2/WebProcess/Plugins/PluginProxy.h -1 / +2 lines
Lines 35-40 Source/WebKit2/WebProcess/Plugins/PluginProxy.h_sec1
35
#include <WebCore/FindOptions.h>
35
#include <WebCore/FindOptions.h>
36
#include <WebCore/IntRect.h>
36
#include <WebCore/IntRect.h>
37
#include <WebCore/SecurityOrigin.h>
37
#include <WebCore/SecurityOrigin.h>
38
#include <memory>
38
39
39
#if PLATFORM(COCOA)
40
#if PLATFORM(COCOA)
40
#include <wtf/RetainPtr.h>
41
#include <wtf/RetainPtr.h>
Lines 215-221 private: Source/WebKit2/WebProcess/Plugins/PluginProxy.h_sec2
215
    // The client ID for the CA layer in the plug-in process. Will be 0 if the plug-in is not a CA plug-in.
216
    // The client ID for the CA layer in the plug-in process. Will be 0 if the plug-in is not a CA plug-in.
216
    uint32_t m_remoteLayerClientID;
217
    uint32_t m_remoteLayerClientID;
217
    
218
    
218
    OwnPtr<PluginCreationParameters> m_pendingPluginCreationParameters;
219
    std::unique_ptr<PluginCreationParameters> m_pendingPluginCreationParameters;
219
    bool m_waitingOnAsynchronousInitialization;
220
    bool m_waitingOnAsynchronousInitialization;
220
221
221
#if PLATFORM(COCOA)
222
#if PLATFORM(COCOA)
- Source/WebKit2/WebProcess/Plugins/PluginView.cpp -3 / +3 lines
Lines 829-835 String PluginView::getSelectionString() Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec1
829
    return m_plugin->getSelectionString();
829
    return m_plugin->getSelectionString();
830
}
830
}
831
831
832
OwnPtr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const
832
std::unique_ptr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const
833
{
833
{
834
    WebEvent::Type type = WebEvent::NoType;
834
    WebEvent::Type type = WebEvent::NoType;
835
    unsigned clickCount = 1;
835
    unsigned clickCount = 1;
Lines 871-877 OwnPtr<WebEvent> PluginView::createWebEv Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec2
871
    if (event->metaKey())
871
    if (event->metaKey())
872
        modifiers |= WebEvent::MetaKey;
872
        modifiers |= WebEvent::MetaKey;
873
873
874
    return adoptPtr(new WebMouseEvent(type, button, m_plugin->convertToRootView(IntPoint(event->offsetX(), event->offsetY())), event->screenLocation(), 0, 0, 0, clickCount, static_cast<WebEvent::Modifiers>(modifiers), 0));
874
    return std::make_unique<WebMouseEvent>(type, button, m_plugin->convertToRootView(IntPoint(event->offsetX(), event->offsetY())), event->screenLocation(), 0, 0, 0, clickCount, static_cast<WebEvent::Modifiers>(modifiers), 0);
875
}
875
}
876
876
877
void PluginView::handleEvent(Event* event)
877
void PluginView::handleEvent(Event* event)
Lines 880-886 void PluginView::handleEvent(Event* even Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec3
880
        return;
880
        return;
881
881
882
    const WebEvent* currentEvent = WebPage::currentEvent();
882
    const WebEvent* currentEvent = WebPage::currentEvent();
883
    OwnPtr<WebEvent> simulatedWebEvent;
883
    std::unique_ptr<WebEvent> simulatedWebEvent;
884
    if (event->isMouseEvent() && toMouseEvent(event)->isSimulated()) {
884
    if (event->isMouseEvent() && toMouseEvent(event)->isSimulated()) {
885
        simulatedWebEvent = createWebEvent(toMouseEvent(event));
885
        simulatedWebEvent = createWebEvent(toMouseEvent(event));
886
        currentEvent = simulatedWebEvent.get();
886
        currentEvent = simulatedWebEvent.get();
- Source/WebKit2/WebProcess/Plugins/PluginView.h -1 / +2 lines
Lines 39-44 Source/WebKit2/WebProcess/Plugins/PluginView.h_sec1
39
#include <WebCore/ResourceResponse.h>
39
#include <WebCore/ResourceResponse.h>
40
#include <WebCore/Timer.h>
40
#include <WebCore/Timer.h>
41
#include <WebCore/ViewState.h>
41
#include <WebCore/ViewState.h>
42
#include <memory>
42
#include <wtf/Deque.h>
43
#include <wtf/Deque.h>
43
#include <wtf/RunLoop.h>
44
#include <wtf/RunLoop.h>
44
45
Lines 223-229 private: Source/WebKit2/WebProcess/Plugins/PluginView.h_sec2
223
    virtual void didFinishLoad(WebFrame*);
224
    virtual void didFinishLoad(WebFrame*);
224
    virtual void didFailLoad(WebFrame*, bool wasCancelled);
225
    virtual void didFailLoad(WebFrame*, bool wasCancelled);
225
226
226
    OwnPtr<WebEvent> createWebEvent(WebCore::MouseEvent*) const;
227
    std::unique_ptr<WebEvent> createWebEvent(WebCore::MouseEvent*) const;
227
228
228
    RefPtr<WebCore::HTMLPlugInElement> m_pluginElement;
229
    RefPtr<WebCore::HTMLPlugInElement> m_pluginElement;
229
    RefPtr<Plugin> m_plugin;
230
    RefPtr<Plugin> m_plugin;
- Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp -2 / +3 lines
Lines 36-41 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp_sec1
36
#include <WebCore/NotImplemented.h>
36
#include <WebCore/NotImplemented.h>
37
#include <WebCore/ProtectionSpace.h>
37
#include <WebCore/ProtectionSpace.h>
38
#include <WebCore/SharedBuffer.h>
38
#include <WebCore/SharedBuffer.h>
39
#include <memory>
39
#include <utility>
40
#include <utility>
40
#include <wtf/text/StringBuilder.h>
41
#include <wtf/text/StringBuilder.h>
41
42
Lines 49-59 public: Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp_sec2
49
    explicit PluginDestructionProtector(NetscapePlugin* plugin)
50
    explicit PluginDestructionProtector(NetscapePlugin* plugin)
50
    {
51
    {
51
        if (plugin)
52
        if (plugin)
52
            m_protector = adoptPtr(new PluginController::PluginDestructionProtector(static_cast<Plugin*>(plugin)->controller()));
53
            m_protector = std::make_unique<PluginController::PluginDestructionProtector>(static_cast<Plugin*>(plugin)->controller());
53
    }
54
    }
54
    
55
    
55
private:
56
private:
56
    OwnPtr<PluginController::PluginDestructionProtector> m_protector;
57
    std::unique_ptr<PluginController::PluginDestructionProtector> m_protector;
57
};
58
};
58
59
59
static bool startsWithBlankLine(const char* bytes, unsigned length)
60
static bool startsWithBlankLine(const char* bytes, unsigned length)
- Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp -2 / +1 lines
Lines 30-36 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp_sec1
30
30
31
#include "NetscapePlugin.h"
31
#include "NetscapePlugin.h"
32
#include <utility>
32
#include <utility>
33
#include <wtf/PassOwnPtr.h>
34
#include <wtf/Vector.h>
33
#include <wtf/Vector.h>
35
34
36
using namespace WebCore;
35
using namespace WebCore;
Lines 187-193 void NetscapePluginStream::deliverData(c Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp_sec2
187
186
188
    if (m_transferMode != NP_ASFILEONLY) {
187
    if (m_transferMode != NP_ASFILEONLY) {
189
        if (!m_deliveryData)
188
        if (!m_deliveryData)
190
            m_deliveryData = adoptPtr(new Vector<uint8_t>);
189
            m_deliveryData = std::make_unique<Vector<uint8_t>>();
191
190
192
        m_deliveryData->reserveCapacity(m_deliveryData->size() + length);
191
        m_deliveryData->reserveCapacity(m_deliveryData->size() + length);
193
        m_deliveryData->append(bytes, length);
192
        m_deliveryData->append(bytes, length);
- Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h -1 / +2 lines
Lines 30-35 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h_sec1
30
30
31
#include <WebCore/FileSystem.h>
31
#include <WebCore/FileSystem.h>
32
#include <WebCore/npruntime_internal.h>
32
#include <WebCore/npruntime_internal.h>
33
#include <memory>
33
#include <wtf/Forward.h>
34
#include <wtf/Forward.h>
34
#include <wtf/PassRefPtr.h>
35
#include <wtf/PassRefPtr.h>
35
#include <wtf/RefCounted.h>
36
#include <wtf/RefCounted.h>
Lines 106-112 private: Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h_sec2
106
    CString m_headers;
107
    CString m_headers;
107
108
108
    RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer;
109
    RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer;
109
    OwnPtr< Vector<uint8_t>> m_deliveryData;
110
    std::unique_ptr<Vector<uint8_t>> m_deliveryData;
110
    bool m_stopStreamWhenDoneDelivering;
111
    bool m_stopStreamWhenDoneDelivering;
111
};
112
};
112
113
- Source/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.h -1 lines
Lines 25-31 Source/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.h_sec1
25
#include "WebPopupItem.h"
25
#include "WebPopupItem.h"
26
#include <WebCore/PopupMenu.h>
26
#include <WebCore/PopupMenu.h>
27
#include <wtf/Forward.h>
27
#include <wtf/Forward.h>
28
#include <wtf/OwnPtr.h>
29
#include <wtf/Vector.h>
28
#include <wtf/Vector.h>
30
29
31
namespace WebCore {
30
namespace WebCore {
- Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp -1 / +1 lines
Lines 53-59 PassRefPtr<EventDispatcher> EventDispatc Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp_sec1
53
53
54
EventDispatcher::EventDispatcher()
54
EventDispatcher::EventDispatcher()
55
    : m_queue(WorkQueue::create("com.apple.WebKit.EventDispatcher"))
55
    : m_queue(WorkQueue::create("com.apple.WebKit.EventDispatcher"))
56
    , m_recentWheelEventDeltaTracker(adoptPtr(new WheelEventDeltaTracker))
56
    , m_recentWheelEventDeltaTracker(std::make_unique<WheelEventDeltaTracker>())
57
#if ENABLE(IOS_TOUCH_EVENTS)
57
#if ENABLE(IOS_TOUCH_EVENTS)
58
    , m_touchEventsLock(SPINLOCK_INITIALIZER)
58
    , m_touchEventsLock(SPINLOCK_INITIALIZER)
59
#endif
59
#endif
- Source/WebKit2/WebProcess/WebPage/EventDispatcher.h -1 / +2 lines
Lines 30-35 Source/WebKit2/WebProcess/WebPage/EventDispatcher.h_sec1
30
30
31
#include <WebCore/WheelEventDeltaTracker.h>
31
#include <WebCore/WheelEventDeltaTracker.h>
32
#include <WebEvent.h>
32
#include <WebEvent.h>
33
#include <memory>
33
#include <wtf/HashMap.h>
34
#include <wtf/HashMap.h>
34
#include <wtf/Noncopyable.h>
35
#include <wtf/Noncopyable.h>
35
#include <wtf/RefPtr.h>
36
#include <wtf/RefPtr.h>
Lines 94-100 private: Source/WebKit2/WebProcess/WebPage/EventDispatcher.h_sec2
94
    Mutex m_scrollingTreesMutex;
95
    Mutex m_scrollingTreesMutex;
95
    HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees;
96
    HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees;
96
#endif
97
#endif
97
    OwnPtr<WebCore::WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
98
    std::unique_ptr<WebCore::WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
98
#if ENABLE(IOS_TOUCH_EVENTS)
99
#if ENABLE(IOS_TOUCH_EVENTS)
99
    SpinLock m_touchEventsLock;
100
    SpinLock m_touchEventsLock;
100
    HashMap<uint64_t, TouchEventQueue> m_touchEvents;
101
    HashMap<uint64_t, TouchEventQueue> m_touchEvents;
- Source/WebKit2/WebProcess/WebPage/WebPage.cpp -2 / +2 lines
Lines 339-345 WebPage::WebPage(uint64_t pageID, const Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec1
339
339
340
    pageClients.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
340
    pageClients.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
341
341
342
    m_page = adoptPtr(new Page(pageClients));
342
    m_page = std::make_unique<Page>(pageClients);
343
343
344
    m_drawingArea = DrawingArea::create(this, parameters);
344
    m_drawingArea = DrawingArea::create(this, parameters);
345
    m_drawingArea->setPaintingEnabled(false);
345
    m_drawingArea->setPaintingEnabled(false);
Lines 3548-3554 void WebPage::beginPrinting(uint64_t fra Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec2
3548
#endif // PLATFORM(MAC)
3548
#endif // PLATFORM(MAC)
3549
3549
3550
    if (!m_printContext)
3550
    if (!m_printContext)
3551
        m_printContext = adoptPtr(new PrintContext(coreFrame));
3551
        m_printContext = std::make_unique<PrintContext>(coreFrame);
3552
3552
3553
    drawingArea()->setLayerTreeStateIsFrozen(true);
3553
    drawingArea()->setLayerTreeStateIsFrozen(true);
3554
    m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
3554
    m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
- Source/WebKit2/WebProcess/WebPage/WebPage.h -3 / +3 lines
Lines 59-66 Source/WebKit2/WebProcess/WebPage/WebPage.h_sec1
59
#include <WebCore/ViewState.h>
59
#include <WebCore/ViewState.h>
60
#include <WebCore/ViewportConfiguration.h>
60
#include <WebCore/ViewportConfiguration.h>
61
#include <WebCore/WebCoreKeyboardUIMode.h>
61
#include <WebCore/WebCoreKeyboardUIMode.h>
62
#include <memory>
62
#include <wtf/HashMap.h>
63
#include <wtf/HashMap.h>
63
#include <wtf/OwnPtr.h>
64
#include <wtf/PassRefPtr.h>
64
#include <wtf/PassRefPtr.h>
65
#include <wtf/RefPtr.h>
65
#include <wtf/RefPtr.h>
66
#include <wtf/text/WTFString.h>
66
#include <wtf/text/WTFString.h>
Lines 994-1000 private: Source/WebKit2/WebProcess/WebPage/WebPage.h_sec2
994
994
995
    uint64_t m_pageID;
995
    uint64_t m_pageID;
996
996
997
    OwnPtr<WebCore::Page> m_page;
997
    std::unique_ptr<WebCore::Page> m_page;
998
    RefPtr<WebFrame> m_mainFrame;
998
    RefPtr<WebFrame> m_mainFrame;
999
    RefPtr<InjectedBundleBackForwardList> m_backForwardList;
999
    RefPtr<InjectedBundleBackForwardList> m_backForwardList;
1000
1000
Lines 1125-1131 private: Source/WebKit2/WebProcess/WebPage/WebPage.h_sec3
1125
    GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
1125
    GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
1126
#endif
1126
#endif
1127
1127
1128
    OwnPtr<WebCore::PrintContext> m_printContext;
1128
    std::unique_ptr<WebCore::PrintContext> m_printContext;
1129
#if PLATFORM(GTK)
1129
#if PLATFORM(GTK)
1130
    RefPtr<WebPrintOperationGtk> m_printOperation;
1130
    RefPtr<WebPrintOperationGtk> m_printOperation;
1131
#endif
1131
#endif

Return to Bug 129670