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

Side by Side Diff: third_party/WebKit/public/web/WebSharedWorkerClient.h

Issue 2847983002: Use unique_ptr for Create{ServiceWorkerNetworkProvider,ApplicationCacheHost} (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual void WorkerScriptLoaded() = 0; 60 virtual void WorkerScriptLoaded() = 0;
61 virtual void WorkerScriptLoadFailed() = 0; 61 virtual void WorkerScriptLoadFailed() = 0;
62 virtual void SelectAppCacheID(long long) = 0; 62 virtual void SelectAppCacheID(long long) = 0;
63 63
64 // Returns the notification presenter for this worker context. Pointer 64 // Returns the notification presenter for this worker context. Pointer
65 // is owned by the object implementing WebSharedWorkerClient. 65 // is owned by the object implementing WebSharedWorkerClient.
66 virtual WebNotificationPresenter* NotificationPresenter() = 0; 66 virtual WebNotificationPresenter* NotificationPresenter() = 0;
67 67
68 // Called on the main webkit thread in the worker process during 68 // Called on the main webkit thread in the worker process during
69 // initialization. 69 // initialization.
70 virtual WebApplicationCacheHost* CreateApplicationCacheHost( 70 virtual std::unique_ptr<WebApplicationCacheHost> CreateApplicationCacheHost(
71 WebApplicationCacheHostClient*) = 0; 71 WebApplicationCacheHostClient*) = 0;
72 72
73 // Called on the main thread during initialization. 73 // Called on the main thread during initialization.
74 // WebWorkerContentSettingsClientProxy should not retain the given 74 // WebWorkerContentSettingsClientProxy should not retain the given
75 // WebSecurityOrigin, as the proxy instance is passed to worker thread 75 // WebSecurityOrigin, as the proxy instance is passed to worker thread
76 // while WebSecurityOrigin is not thread safe. 76 // while WebSecurityOrigin is not thread safe.
77 virtual WebWorkerContentSettingsClientProxy* 77 virtual WebWorkerContentSettingsClientProxy*
78 CreateWorkerContentSettingsClientProxy(const WebSecurityOrigin& origin) { 78 CreateWorkerContentSettingsClientProxy(const WebSecurityOrigin& origin) {
79 return nullptr; 79 return nullptr;
80 } 80 }
81 81
82 // Called on the main thread during initialization. 82 // Called on the main thread during initialization.
83 // Ownership of the returned object is transferred to the caller. 83 // Ownership of the returned object is transferred to the caller.
nhiroki 2017/05/01 05:04:27 This ownership comment would be no longer useful.
84 virtual WebServiceWorkerNetworkProvider* 84 virtual std::unique_ptr<WebServiceWorkerNetworkProvider>
85 CreateServiceWorkerNetworkProvider() { 85 CreateServiceWorkerNetworkProvider() = 0;
86 return nullptr;
87 }
88 86
89 virtual void SendDevToolsMessage(int session_id, 87 virtual void SendDevToolsMessage(int session_id,
90 int call_id, 88 int call_id,
91 const WebString& message, 89 const WebString& message,
92 const WebString& state) {} 90 const WebString& state) {}
93 virtual WebDevToolsAgentClient::WebKitClientMessageLoop* 91 virtual WebDevToolsAgentClient::WebKitClientMessageLoop*
94 CreateDevToolsMessageLoop() { 92 CreateDevToolsMessageLoop() {
95 return nullptr; 93 return nullptr;
96 } 94 }
97 95
98 // Returns a new WebWorkerFetchContext for the shared worker. Ownership of the 96 // Returns a new WebWorkerFetchContext for the shared worker. Ownership of the
99 // returned object is transferred to the caller. This is used only when 97 // returned object is transferred to the caller. This is used only when
100 // off-main-thread-fetch is enabled. 98 // off-main-thread-fetch is enabled.
101 virtual std::unique_ptr<WebWorkerFetchContext> CreateWorkerFetchContext( 99 virtual std::unique_ptr<WebWorkerFetchContext> CreateWorkerFetchContext(
102 WebServiceWorkerNetworkProvider*) { 100 WebServiceWorkerNetworkProvider*) {
103 return nullptr; 101 return nullptr;
104 } 102 }
105 }; 103 };
106 104
107 } // namespace blink 105 } // namespace blink
108 106
109 #endif 107 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698