| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef DispatcherBase_h | 5 #ifndef DispatcherBase_h |
| 6 #define DispatcherBase_h | 6 #define DispatcherBase_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/inspector_protocol/BackendCallback.h" | 9 #include "platform/inspector_protocol/BackendCallback.h" |
| 10 #include "platform/inspector_protocol/Collections.h" | 10 #include "platform/inspector_protocol/Collections.h" |
| 11 #include "platform/inspector_protocol/ErrorSupport.h" | 11 #include "platform/inspector_protocol/ErrorSupport.h" |
| 12 #include "platform/inspector_protocol/String16.h" | 12 #include "platform/inspector_protocol/String16.h" |
| 13 #include "platform/inspector_protocol/Values.h" | 13 #include "platform/inspector_protocol/Values.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 namespace protocol { | 16 namespace protocol { |
| 17 | 17 |
| 18 class FrontendChannel; | 18 class FrontendChannel; |
| 19 class WeakPtr; | 19 class WeakPtr; |
| 20 | 20 |
| 21 class PLATFORM_EXPORT DispatcherBase { | 21 class PLATFORM_EXPORT DispatcherBase { |
| 22 PROTOCOL_DISALLOW_COPY(DispatcherBase); | 22 PROTOCOL_DISALLOW_COPY(DispatcherBase); |
| 23 public: | 23 public: |
| 24 class WeakPtr { | 24 static const char kInvalidRequest[]; |
| 25 class PLATFORM_EXPORT WeakPtr { |
| 25 public: | 26 public: |
| 26 explicit WeakPtr(DispatcherBase*); | 27 explicit WeakPtr(DispatcherBase*); |
| 27 ~WeakPtr(); | 28 ~WeakPtr(); |
| 28 DispatcherBase* get() { return m_dispatcher; } | 29 DispatcherBase* get() { return m_dispatcher; } |
| 29 void dispose() { m_dispatcher = nullptr; } | 30 void dispose() { m_dispatcher = nullptr; } |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 DispatcherBase* m_dispatcher; | 33 DispatcherBase* m_dispatcher; |
| 33 }; | 34 }; |
| 34 | 35 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 88 |
| 88 private: | 89 private: |
| 89 FrontendChannel* m_frontendChannel; | 90 FrontendChannel* m_frontendChannel; |
| 90 protocol::HashMap<String16, std::unique_ptr<protocol::DispatcherBase>> m_dis
patchers; | 91 protocol::HashMap<String16, std::unique_ptr<protocol::DispatcherBase>> m_dis
patchers; |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace platform | 94 } // namespace platform |
| 94 } // namespace blink | 95 } // namespace blink |
| 95 | 96 |
| 96 #endif // !defined(DispatcherBase_h) | 97 #endif // !defined(DispatcherBase_h) |
| OLD | NEW |