OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_DIAGNOSTICS_PRIVATE_AP
I_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_DIAGNOSTICS_PRIVATE_AP
I_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/extensions/api/api_function.h" |
| 12 #include "chrome/common/extensions/api/diagnostics_private.h" |
| 13 |
| 14 namespace extensions { |
| 15 |
| 16 class DiagnosticsPrivateSendPacketFunction : public AsyncApiFunction { |
| 17 public: |
| 18 DECLARE_EXTENSION_FUNCTION("diagnosticsPrivate.sendPacket", |
| 19 DIAGNOSTICSPRIVATE_SENDPACKET); |
| 20 DiagnosticsPrivateSendPacketFunction(); |
| 21 |
| 22 protected: |
| 23 virtual ~DiagnosticsPrivateSendPacketFunction(); |
| 24 |
| 25 // AsyncApiFunction: |
| 26 virtual bool Prepare() OVERRIDE; |
| 27 virtual void AsyncWorkStart() OVERRIDE; |
| 28 virtual bool Respond() OVERRIDE; |
| 29 |
| 30 private: |
| 31 void OnComplete(const std::string& error, |
| 32 const std::string& ip, |
| 33 double latency); |
| 34 |
| 35 scoped_ptr<extensions::api::diagnostics_private::SendPacket::Params> |
| 36 parameters_; |
| 37 }; |
| 38 |
| 39 } // namespace extensions |
| 40 |
| 41 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAGNOSTICS_PRIVATE_DIAGNOSTICS_PRIVATE
_API_H_ |
OLD | NEW |