Chromium Code Reviews| Index: extensions/renderer/api/display_source/wifi_display/wifi_display_session.h |
| diff --git a/extensions/renderer/api/display_source/wifi_display/wifi_display_session.h b/extensions/renderer/api/display_source/wifi_display/wifi_display_session.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..46339ffdfd7d158257eca7a76eb14948f50b70ab |
| --- /dev/null |
| +++ b/extensions/renderer/api/display_source/wifi_display/wifi_display_session.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION_H_ |
| +#define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION_H_ |
| + |
| +#include <string> |
| + |
| +#include "extensions/common/mojo/wifi_display_session_service.mojom.h" |
| +#include "extensions/renderer/api/display_source/display_source_session.h" |
| +#include "mojo/public/cpp/bindings/binding.h" |
| + |
| +namespace extensions { |
| + |
| +class WiFiDisplaySession: public DisplaySourceSession, |
| + public WiFiDisplaySessionServiceClient { |
| + public: |
| + explicit WiFiDisplaySession( |
| + const DisplaySourceSessionParams& params); |
| + ~WiFiDisplaySession() override; |
| + |
| + private: |
| + // DisplaySourceSession overrides. |
| + void Start() override; |
| + void Terminate() override; |
| + |
| + // WiFiDisplaySessionServiceClient overrides. |
| + void OnConnected(int32_t sink_id, |
| + const mojo::String& ip_address) override; |
| + void OnDisconnected(int32_t sink_id) override; |
| + void OnError(int32_t sink_id, |
| + int32_t type, |
| + const mojo::String& description) override; |
| + void OnMessage(const mojo::String& data) override; |
| + |
| + private: |
| + WiFiDisplaySessionServicePtr service_; |
| + mojo::Binding<WiFiDisplaySessionServiceClient> binding_; |
| + std::string ip_address_; |
| + DisplaySourceSessionParams params_; |
| +}; |
|
Ken Rockot(use gerrit already)
2016/01/05 17:21:37
nit: DISALLOW_COPY_AND_ASSIGN
Mikhail
2016/01/11 19:39:41
Done.
|
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION_H_ |