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

Side by Side Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 137633004: Add WorkerGlobalScope* param to WorkerReportingProxy::workerGlobalScopeStarted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes sage) 64 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes sage)
65 { 65 {
66 m_client->dispatchDevToolsMessage(message); 66 m_client->dispatchDevToolsMessage(message);
67 } 67 }
68 68
69 void ServiceWorkerGlobalScopeProxy::updateInspectorStateCookie(const String& mes sage) 69 void ServiceWorkerGlobalScopeProxy::updateInspectorStateCookie(const String& mes sage)
70 { 70 {
71 m_client->saveDevToolsAgentState(message); 71 m_client->saveDevToolsAgentState(message);
72 } 72 }
73 73
74 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted() 74 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope* workerGlobalScope)
75 { 75 {
76 ASSERT(!m_workerGlobalScope);
77 m_workerGlobalScope = workerGlobalScope;
76 m_client->workerContextStarted(this); 78 m_client->workerContextStarted(this);
77 } 79 }
78 80
79 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() 81 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed()
80 { 82 {
81 m_executionContext.postTask(bind(&WebEmbeddedWorkerImpl::terminateWorkerCont ext, &m_embeddedWorker)); 83 m_executionContext.postTask(bind(&WebEmbeddedWorkerImpl::terminateWorkerCont ext, &m_embeddedWorker));
82 } 84 }
83 85
84 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeDestroyed() 86 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeDestroyed()
85 { 87 {
88 m_workerGlobalScope = 0;
86 m_client->workerContextDestroyed(); 89 m_client->workerContextDestroyed();
87 } 90 }
88 91
89 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm pl& embeddedWorker, ExecutionContext& executionContext, PassOwnPtr<WebServiceWor kerContextClient> client) 92 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm pl& embeddedWorker, ExecutionContext& executionContext, PassOwnPtr<WebServiceWor kerContextClient> client)
90 : m_embeddedWorker(embeddedWorker) 93 : m_embeddedWorker(embeddedWorker)
91 , m_executionContext(executionContext) 94 , m_executionContext(executionContext)
92 , m_client(client) 95 , m_client(client)
96 , m_workerGlobalScope(0)
93 { 97 {
94 ASSERT(m_client); 98 ASSERT(m_client);
95 } 99 }
96 100
97 } // namespace blink 101 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698