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/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1696653002: Fix non-Oilpan build following r375129. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/modules/serviceworkers/ExtendableMessageEvent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Activate, eventID); 100 WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Activate, eventID);
101 RefPtrWillBeRawPtr<Event> event(ExtendableEvent::create(EventTypeNames::acti vate, ExtendableEventInit(), observer)); 101 RefPtrWillBeRawPtr<Event> event(ExtendableEvent::create(EventTypeNames::acti vate, ExtendableEventInit(), observer));
102 workerGlobalScope()->dispatchExtendableEvent(event.release(), observer); 102 workerGlobalScope()->dispatchExtendableEvent(event.release(), observer);
103 } 103 }
104 104
105 void ServiceWorkerGlobalScopeProxy::dispatchExtendableMessageEvent(int eventID, const WebString& message, const WebMessagePortChannelArray& webChannels) 105 void ServiceWorkerGlobalScopeProxy::dispatchExtendableMessageEvent(int eventID, const WebString& message, const WebMessagePortChannelArray& webChannels)
106 { 106 {
107 ASSERT(RuntimeEnabledFeatures::serviceWorkerExtendableMessageEventEnabled()) ; 107 ASSERT(RuntimeEnabledFeatures::serviceWorkerExtendableMessageEventEnabled()) ;
108 108
109 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag e); 109 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag e);
110 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray (m_workerGlobalScope, webChannels); 110 MessagePortArray* ports = MessagePort::toMessagePortArray(m_workerGlobalScop e, webChannels);
111 // TODO(nhiroki): Support |origin| and |source| attributes. 111 // TODO(nhiroki): Support |origin| and |source| attributes.
112 // (http://crbug.com/543198) 112 // (http://crbug.com/543198)
113 113
114 WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Message, eventID); 114 WaitUntilObserver* observer = WaitUntilObserver::create(workerGlobalScope(), WaitUntilObserver::Message, eventID);
115 115
116 RefPtrWillBeRawPtr<Event> event(ExtendableMessageEvent::create(value, String (), ports, observer)); 116 RefPtrWillBeRawPtr<Event> event(ExtendableMessageEvent::create(value, String (), ports, observer));
117 workerGlobalScope()->dispatchExtendableEvent(event.release(), observer); 117 workerGlobalScope()->dispatchExtendableEvent(event.release(), observer);
118 } 118 }
119 119
120 void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer viceWorkerRequest& webRequest) 120 void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer viceWorkerRequest& webRequest)
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 eventInit.setCancelable(true); 304 eventInit.setCancelable(true);
305 eventInit.setRequest(request); 305 eventInit.setRequest(request);
306 eventInit.setClientId(webRequest.isMainResourceLoad() ? WebString() : webReq uest.clientId()); 306 eventInit.setClientId(webRequest.isMainResourceLoad() ? WebString() : webReq uest.clientId());
307 eventInit.setIsReload(webRequest.isReload()); 307 eventInit.setIsReload(webRequest.isReload());
308 RefPtrWillBeRawPtr<FetchEvent> fetchEvent(FetchEvent::create(eventTypeName, eventInit, observer)); 308 RefPtrWillBeRawPtr<FetchEvent> fetchEvent(FetchEvent::create(eventTypeName, eventInit, observer));
309 defaultPrevented = !workerGlobalScope()->dispatchEvent(fetchEvent.release()) ; 309 defaultPrevented = !workerGlobalScope()->dispatchEvent(fetchEvent.release()) ;
310 observer->didDispatchEvent(defaultPrevented); 310 observer->didDispatchEvent(defaultPrevented);
311 } 311 }
312 312
313 } // namespace blink 313 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/serviceworkers/ExtendableMessageEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698