OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_SERVICE_H_ |
6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_SERVICE_H_ | 6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "chrome/browser/debugger/devtools_remote.h" | 10 #include "chrome/browser/debugger/devtools_remote.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 static const char kVersion[]; | 22 static const char kVersion[]; |
23 static const char kListTabs[]; | 23 static const char kListTabs[]; |
24 }; | 24 }; |
25 | 25 |
26 // Handles Chrome remote debugger protocol service commands. | 26 // Handles Chrome remote debugger protocol service commands. |
27 class DevToolsRemoteService : public DevToolsRemoteListener { | 27 class DevToolsRemoteService : public DevToolsRemoteListener { |
28 public: | 28 public: |
29 explicit DevToolsRemoteService(DevToolsProtocolHandler* delegate); | 29 explicit DevToolsRemoteService(DevToolsProtocolHandler* delegate); |
30 | 30 |
31 // DevToolsRemoteListener interface | 31 // DevToolsRemoteListener interface |
32 virtual void HandleMessage(const DevToolsRemoteMessage& message); | 32 virtual void HandleMessage(const DevToolsRemoteMessage& message) OVERRIDE; |
33 virtual void OnConnectionLost() {} | 33 virtual void OnConnectionLost() OVERRIDE {} |
34 | 34 |
35 static const char kToolName[]; | 35 static const char kToolName[]; |
36 | 36 |
37 private: | 37 private: |
38 // Operation result returned in the "result" field. | 38 // Operation result returned in the "result" field. |
39 struct Result { | 39 struct Result { |
40 static const int kOk = 0; | 40 static const int kOk = 0; |
41 static const int kUnknownCommand = 1; | 41 static const int kUnknownCommand = 1; |
42 }; | 42 }; |
43 virtual ~DevToolsRemoteService(); | 43 virtual ~DevToolsRemoteService(); |
44 void ProcessJson(base::DictionaryValue* json, | 44 void ProcessJson(base::DictionaryValue* json, |
45 const DevToolsRemoteMessage& message); | 45 const DevToolsRemoteMessage& message); |
46 DevToolsProtocolHandler* delegate_; | 46 DevToolsProtocolHandler* delegate_; |
47 DISALLOW_COPY_AND_ASSIGN(DevToolsRemoteService); | 47 DISALLOW_COPY_AND_ASSIGN(DevToolsRemoteService); |
48 }; | 48 }; |
49 | 49 |
50 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_SERVICE_H_ | 50 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_SERVICE_H_ |
OLD | NEW |