| OLD | NEW |
| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 class InspectorFrontendChannel; | 137 class InspectorFrontendChannel; |
| 138 | 138 |
| 139 typedef String ErrorString; | 139 typedef String ErrorString; |
| 140 | 140 |
| 141 class InspectorBackendDispatcherImpl; | 141 class InspectorBackendDispatcherImpl; |
| 142 | 142 |
| 143 class InspectorBackendDispatcher: public RefCountedWillBeGarbageCollectedFinaliz
ed<InspectorBackendDispatcher> { | 143 class InspectorBackendDispatcher: public RefCountedWillBeGarbageCollectedFinaliz
ed<InspectorBackendDispatcher> { |
| 144 public: | 144 public: |
| 145 static PassRefPtrWillBeRawPtr<InspectorBackendDispatcher> create(InspectorFr
ontendChannel* inspectorFrontendChannel); | 145 static PassRefPtrWillBeRawPtr<InspectorBackendDispatcher> create(InspectorFr
ontendChannel* inspectorFrontendChannel); |
| 146 virtual ~InspectorBackendDispatcher() { } | 146 virtual ~InspectorBackendDispatcher() { } |
| 147 virtual void trace(Visitor*) { } | 147 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 148 | 148 |
| 149 class CallbackBase: public RefCountedWillBeGarbageCollectedFinalized<Callbac
kBase> { | 149 class CallbackBase: public RefCountedWillBeGarbageCollectedFinalized<Callbac
kBase> { |
| 150 public: | 150 public: |
| 151 CallbackBase(PassRefPtrWillBeRawPtr<InspectorBackendDispatcherImpl> back
endImpl, int id); | 151 CallbackBase(PassRefPtrWillBeRawPtr<InspectorBackendDispatcherImpl> back
endImpl, int id); |
| 152 virtual ~CallbackBase(); | 152 virtual ~CallbackBase(); |
| 153 virtual void trace(Visitor*); | 153 DECLARE_VIRTUAL_TRACE(); |
| 154 void sendFailure(const ErrorString&); | 154 void sendFailure(const ErrorString&); |
| 155 bool isActive(); | 155 bool isActive(); |
| 156 | 156 |
| 157 protected: | 157 protected: |
| 158 void sendIfActive(PassRefPtr<JSONObject> partialMessage, const ErrorStri
ng& invocationError, PassRefPtr<JSONValue> errorData); | 158 void sendIfActive(PassRefPtr<JSONObject> partialMessage, const ErrorStri
ng& invocationError, PassRefPtr<JSONValue> errorData); |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 void disable() { m_alreadySent = true; } | 161 void disable() { m_alreadySent = true; } |
| 162 | 162 |
| 163 RefPtrWillBeMember<InspectorBackendDispatcherImpl> m_backendImpl; | 163 RefPtrWillBeMember<InspectorBackendDispatcherImpl> m_backendImpl; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return false; | 460 return false; |
| 461 | 461 |
| 462 return true; | 462 return true; |
| 463 } | 463 } |
| 464 | 464 |
| 465 InspectorBackendDispatcher::CallbackBase::CallbackBase(PassRefPtrWillBeRawPtr<In
spectorBackendDispatcherImpl> backendImpl, int id) | 465 InspectorBackendDispatcher::CallbackBase::CallbackBase(PassRefPtrWillBeRawPtr<In
spectorBackendDispatcherImpl> backendImpl, int id) |
| 466 : m_backendImpl(backendImpl), m_id(id), m_alreadySent(false) {} | 466 : m_backendImpl(backendImpl), m_id(id), m_alreadySent(false) {} |
| 467 | 467 |
| 468 InspectorBackendDispatcher::CallbackBase::~CallbackBase() {} | 468 InspectorBackendDispatcher::CallbackBase::~CallbackBase() {} |
| 469 | 469 |
| 470 void InspectorBackendDispatcher::CallbackBase::trace(Visitor* visitor) | 470 DEFINE_TRACE(InspectorBackendDispatcher::CallbackBase) |
| 471 { | 471 { |
| 472 visitor->trace(m_backendImpl); | 472 visitor->trace(m_backendImpl); |
| 473 } | 473 } |
| 474 | 474 |
| 475 void InspectorBackendDispatcher::CallbackBase::sendFailure(const ErrorString& er
ror) | 475 void InspectorBackendDispatcher::CallbackBase::sendFailure(const ErrorString& er
ror) |
| 476 { | 476 { |
| 477 ASSERT(error.length()); | 477 ASSERT(error.length()); |
| 478 sendIfActive(nullptr, error, PassRefPtr<JSONValue>()); | 478 sendIfActive(nullptr, error, PassRefPtr<JSONValue>()); |
| 479 } | 479 } |
| 480 | 480 |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 }; | 905 }; |
| 906 | 906 |
| 907 """) | 907 """) |
| 908 | 908 |
| 909 class_binding_builder_part_4 = ( | 909 class_binding_builder_part_4 = ( |
| 910 """ static Builder<NoFieldsSet> create() | 910 """ static Builder<NoFieldsSet> create() |
| 911 { | 911 { |
| 912 return Builder<NoFieldsSet>(JSONObject::create()); | 912 return Builder<NoFieldsSet>(JSONObject::create()); |
| 913 } | 913 } |
| 914 """) | 914 """) |
| OLD | NEW |