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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 2651583007: Plumbing blink::Interface{Provider|Registry} through WebLocalFrame's constructor. (Closed)
Patch Set: ScreenWakeLockTest Created 3 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
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // infrastructure. 125 // infrastructure.
126 DCHECK(!m_webView); 126 DCHECK(!m_webView);
127 m_webView = WebView::create(nullptr, WebPageVisibilityStateVisible); 127 m_webView = WebView::create(nullptr, WebPageVisibilityStateVisible);
128 // FIXME: http://crbug.com/363843. This needs to find a better way to 128 // FIXME: http://crbug.com/363843. This needs to find a better way to
129 // not create graphics layers. 129 // not create graphics layers.
130 m_webView->settings()->setAcceleratedCompositingEnabled(false); 130 m_webView->settings()->setAcceleratedCompositingEnabled(false);
131 // FIXME: Settings information should be passed to the Worker process from 131 // FIXME: Settings information should be passed to the Worker process from
132 // Browser process when the worker is created (similar to 132 // Browser process when the worker is created (similar to
133 // RenderThread::OnCreateNewView). 133 // RenderThread::OnCreateNewView).
134 m_mainFrame = toWebLocalFrameImpl( 134 m_mainFrame = toWebLocalFrameImpl(
135 WebLocalFrame::create(WebTreeScopeType::Document, this)); 135 WebLocalFrame::create(WebTreeScopeType::Document, this,
136 Platform::current()->interfaceProvider(), nullptr));
Łukasz Anforowicz 2017/01/23 23:38:16 blink::WebEmbeddedWorkerImpl used to override inte
136 m_webView->setMainFrame(m_mainFrame.get()); 137 m_webView->setMainFrame(m_mainFrame.get());
137 m_mainFrame->setDevToolsAgentClient(this); 138 m_mainFrame->setDevToolsAgentClient(this);
138 139
139 // If we were asked to pause worker context on start and wait for debugger 140 // If we were asked to pause worker context on start and wait for debugger
140 // then it is the good time to do that. 141 // then it is the good time to do that.
141 m_client->workerReadyForInspection(); 142 m_client->workerReadyForInspection();
142 if (m_pauseWorkerContextOnStart) { 143 if (m_pauseWorkerContextOnStart) {
143 m_isPausedOnStart = true; 144 m_isPausedOnStart = true;
144 return; 145 return;
145 } 146 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return m_networkProvider && 194 return m_networkProvider &&
194 m_networkProvider->isControlledByServiceWorker(dataSource); 195 m_networkProvider->isControlledByServiceWorker(dataSource);
195 } 196 }
196 197
197 int64_t WebSharedWorkerImpl::serviceWorkerID(WebDataSource& dataSource) { 198 int64_t WebSharedWorkerImpl::serviceWorkerID(WebDataSource& dataSource) {
198 if (!m_networkProvider) 199 if (!m_networkProvider)
199 return -1; 200 return -1;
200 return m_networkProvider->serviceWorkerID(dataSource); 201 return m_networkProvider->serviceWorkerID(dataSource);
201 } 202 }
202 203
203 InterfaceProvider* WebSharedWorkerImpl::interfaceProvider() {
204 return Platform::current()->interfaceProvider();
205 }
206
207 void WebSharedWorkerImpl::sendProtocolMessage(int sessionId, 204 void WebSharedWorkerImpl::sendProtocolMessage(int sessionId,
208 int callId, 205 int callId,
209 const WebString& message, 206 const WebString& message,
210 const WebString& state) { 207 const WebString& state) {
211 m_client->sendDevToolsMessage(sessionId, callId, message, state); 208 m_client->sendDevToolsMessage(sessionId, callId, message, state);
212 } 209 }
213 210
214 void WebSharedWorkerImpl::resumeStartup() { 211 void WebSharedWorkerImpl::resumeStartup() {
215 bool isPausedOnStart = m_isPausedOnStart; 212 bool isPausedOnStart = m_isPausedOnStart;
216 m_isPausedOnStart = false; 213 m_isPausedOnStart = false;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 if (devtoolsAgent) 465 if (devtoolsAgent)
469 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, 466 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method,
470 message); 467 message);
471 } 468 }
472 469
473 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { 470 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) {
474 return new WebSharedWorkerImpl(client); 471 return new WebSharedWorkerImpl(client);
475 } 472 }
476 473
477 } // namespace blink 474 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698