| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ | 5 #ifndef REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ |
| 6 #define REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ | 6 #define REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ |
| 7 | 7 |
| 8 #include <cstdint> |
| 8 #include <memory> | 9 #include <memory> |
| 10 #include <string> |
| 9 | 11 |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 13 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
| 14 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
| 15 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 16 #include "extensions/browser/api/messaging/native_messaging_channel.h" | 18 #include "extensions/browser/api/messaging/native_messaging_channel.h" |
| 17 #include "remoting/host/native_messaging/log_message_handler.h" | 19 #include "remoting/host/native_messaging/log_message_handler.h" |
| 18 #include "remoting/host/setup/daemon_controller.h" | 20 #include "remoting/host/setup/daemon_controller.h" |
| 19 #include "remoting/host/setup/oauth_client.h" | 21 #include "remoting/host/setup/oauth_client.h" |
| 20 | 22 |
| 21 namespace base { | 23 namespace base { |
| 22 class DictionaryValue; | 24 class DictionaryValue; |
| 23 class ListValue; | 25 class ListValue; |
| 24 } // namespace base | 26 } // namespace base |
| 25 | 27 |
| 26 namespace gaia { | 28 namespace gaia { |
| 27 class GaiaOAuthClient; | 29 class GaiaOAuthClient; |
| 28 } // namespace gaia | 30 } // namespace gaia |
| 29 | 31 |
| 30 namespace remoting { | 32 namespace remoting { |
| 31 | 33 |
| 32 const char kElevatingSwitchName[] = "elevate"; | |
| 33 const char kInputSwitchName[] = "input"; | |
| 34 const char kOutputSwitchName[] = "output"; | |
| 35 | |
| 36 namespace protocol { | 34 namespace protocol { |
| 37 class PairingRegistry; | 35 class PairingRegistry; |
| 38 } // namespace protocol | 36 } // namespace protocol |
| 39 | 37 |
| 40 // Implementation of the me2me native messaging host. | 38 // Implementation of the me2me native messaging host. |
| 41 class Me2MeNativeMessagingHost | 39 class Me2MeNativeMessagingHost |
| 42 : public extensions::NativeMessagingChannel::EventHandler { | 40 : public extensions::NativeMessagingChannel::EventHandler { |
| 43 public: | 41 public: |
| 44 Me2MeNativeMessagingHost( | 42 Me2MeNativeMessagingHost( |
| 45 bool needs_elevation, | 43 bool needs_elevation, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 181 |
| 184 base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; | 182 base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; |
| 185 base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_; | 183 base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_; |
| 186 | 184 |
| 187 DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); | 185 DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); |
| 188 }; | 186 }; |
| 189 | 187 |
| 190 } // namespace remoting | 188 } // namespace remoting |
| 191 | 189 |
| 192 #endif // REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ | 190 #endif // REMOTING_HOST_SETUP_ME2ME_NATIVE_MESSAGING_HOST_H_ |
| OLD | NEW |