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

Side by Side Diff: Source/core/inspector/CodeGeneratorInspectorStrings.py

Issue 316813003: DevTools: make Id the first parameter of protocol message. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | Source/devtools/front_end/sdk/InspectorBackend.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 351
352 void InspectorBackendDispatcherImpl::sendResponse(long callId, PassRefPtr<JSONOb ject> result, const ErrorString& invocationError, PassRefPtr<JSONValue> errorDat a) 352 void InspectorBackendDispatcherImpl::sendResponse(long callId, PassRefPtr<JSONOb ject> result, const ErrorString& invocationError, PassRefPtr<JSONValue> errorDat a)
353 { 353 {
354 if (invocationError.length()) { 354 if (invocationError.length()) {
355 reportProtocolError(&callId, ServerError, invocationError, errorData); 355 reportProtocolError(&callId, ServerError, invocationError, errorData);
356 return; 356 return;
357 } 357 }
358 358
359 RefPtr<JSONObject> responseMessage = JSONObject::create(); 359 RefPtr<JSONObject> responseMessage = JSONObject::create();
360 responseMessage->setNumber("id", callId);
360 responseMessage->setObject("result", result); 361 responseMessage->setObject("result", result);
361 responseMessage->setNumber("id", callId);
362 if (m_inspectorFrontendChannel) 362 if (m_inspectorFrontendChannel)
363 m_inspectorFrontendChannel->sendMessageToFrontend(responseMessage.releas e()); 363 m_inspectorFrontendChannel->sendMessageToFrontend(responseMessage.releas e());
364 } 364 }
365 365
366 void InspectorBackendDispatcher::reportProtocolError(const long* const callId, C ommonErrorCode code, const String& errorMessage) const 366 void InspectorBackendDispatcher::reportProtocolError(const long* const callId, C ommonErrorCode code, const String& errorMessage) const
367 { 367 {
368 reportProtocolError(callId, code, errorMessage, PassRefPtr<JSONValue>()); 368 reportProtocolError(callId, code, errorMessage, PassRefPtr<JSONValue>());
369 } 369 }
370 370
371 void InspectorBackendDispatcherImpl::reportProtocolError(const long* const callI d, CommonErrorCode code, const String& errorMessage, PassRefPtr<JSONValue> data) const 371 void InspectorBackendDispatcherImpl::reportProtocolError(const long* const callI d, CommonErrorCode code, const String& errorMessage, PassRefPtr<JSONValue> data) const
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 }; 951 };
952 952
953 """) 953 """)
954 954
955 class_binding_builder_part_4 = ( 955 class_binding_builder_part_4 = (
956 """ static Builder<NoFieldsSet> create() 956 """ static Builder<NoFieldsSet> create()
957 { 957 {
958 return Builder<NoFieldsSet>(JSONObject::create()); 958 return Builder<NoFieldsSet>(JSONObject::create());
959 } 959 }
960 """) 960 """)
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/sdk/InspectorBackend.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698