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

Side by Side Diff: content/browser/navigator_connect/navigator_connect_context_impl.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/navigator_connect/navigator_connect_context_impl.h" 5 #include "content/browser/navigator_connect/navigator_connect_context_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/browser/message_port_service.h" 10 #include "content/browser/message_port_service.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 const scoped_refptr<ServiceWorkerVersion>& worker, 219 const scoped_refptr<ServiceWorkerVersion>& worker,
220 int request_id, 220 int request_id,
221 ServicePortConnectResult result, 221 ServicePortConnectResult result,
222 const mojo::String& name, 222 const mojo::String& name,
223 const mojo::String& data) { 223 const mojo::String& data) {
224 DCHECK_CURRENTLY_ON(BrowserThread::IO); 224 DCHECK_CURRENTLY_ON(BrowserThread::IO);
225 225
226 if (!worker->FinishRequest(request_id)) 226 if (!worker->FinishRequest(request_id))
227 return; 227 return;
228 228
229 if (result != SERVICE_PORT_CONNECT_RESULT_ACCEPT) { 229 if (result != ServicePortConnectResult::ACCEPT) {
230 OnConnectError(callback, client_port_id, service_port_id, 230 OnConnectError(callback, client_port_id, service_port_id,
231 SERVICE_WORKER_ERROR_FAILED); 231 SERVICE_WORKER_ERROR_FAILED);
232 return; 232 return;
233 } 233 }
234 234
235 // TODO(mek): Might have to do something else if the client connection got 235 // TODO(mek): Might have to do something else if the client connection got
236 // severed while the service side connection was being set up. 236 // severed while the service side connection was being set up.
237 callback.Run(client_port_id, true); 237 callback.Run(client_port_id, true);
238 } 238 }
239 239
(...skipping 17 matching lines...) Expand all
257 DCHECK(active_version); 257 DCHECK(active_version);
258 258
259 const Port& port = ports_[port_id]; 259 const Port& port = ports_[port_id];
260 NavigatorConnectClient client(port.target_url, port.client_origin, port_id); 260 NavigatorConnectClient client(port.target_url, port.client_origin, port_id);
261 active_version->DispatchCrossOriginMessageEvent( 261 active_version->DispatchCrossOriginMessageEvent(
262 client, message, sent_message_ports, 262 client, message, sent_message_ports,
263 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); 263 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback));
264 } 264 }
265 265
266 } // namespace content 266 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/cdm/browser_cdm_manager.cc ('k') | content/browser/navigator_connect/service_port_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698