| 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_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ | 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ |
| 6 #define REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ | 6 #define REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 std::unique_ptr<base::DictionaryValue> response); | 70 std::unique_ptr<base::DictionaryValue> response); |
| 71 void ProcessIncomingIq(std::unique_ptr<base::DictionaryValue> message, | 71 void ProcessIncomingIq(std::unique_ptr<base::DictionaryValue> message, |
| 72 std::unique_ptr<base::DictionaryValue> response); | 72 std::unique_ptr<base::DictionaryValue> response); |
| 73 void SendErrorAndExit(std::unique_ptr<base::DictionaryValue> response, | 73 void SendErrorAndExit(std::unique_ptr<base::DictionaryValue> response, |
| 74 const std::string& description) const; | 74 const std::string& description) const; |
| 75 void SendMessageToClient(std::unique_ptr<base::Value> message) const; | 75 void SendMessageToClient(std::unique_ptr<base::Value> message) const; |
| 76 | 76 |
| 77 // Callback for DelegatingSignalStrategy. | 77 // Callback for DelegatingSignalStrategy. |
| 78 void SendOutgoingIq(const std::string& iq); | 78 void SendOutgoingIq(const std::string& iq); |
| 79 | 79 |
| 80 // Called when initial policies are read. | 80 // Called when initial policies are read and when they change. |
| 81 void OnPolicyUpdate(std::unique_ptr<base::DictionaryValue> policies); | 81 void OnPolicyUpdate(std::unique_ptr<base::DictionaryValue> policies); |
| 82 | 82 |
| 83 // Returns whether the request was successfully sent to the elevated host. | 83 // Returns whether the request was successfully sent to the elevated host. |
| 84 bool DelegateToElevatedHost(std::unique_ptr<base::DictionaryValue> message); | 84 bool DelegateToElevatedHost(std::unique_ptr<base::DictionaryValue> message); |
| 85 | 85 |
| 86 // Used to determine whether to create and pass messages to an elevated host. | 86 // Used to determine whether to create and pass messages to an elevated host. |
| 87 bool needs_elevation_ = false; | 87 bool needs_elevation_ = false; |
| 88 | 88 |
| 89 #if defined(OS_WIN) | 89 #if defined(OS_WIN) |
| 90 // Controls the lifetime of the elevated native messaging host process. | 90 // Controls the lifetime of the elevated native messaging host process. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_; | 130 base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_; |
| 131 base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_; | 131 base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHost); | 133 DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHost); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace remoting | 136 } // namespace remoting |
| 137 | 137 |
| 138 #endif // REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ | 138 #endif // REMOTING_HOST_IT2ME_IT2ME_NATIVE_MESSAGING_HOST_H_ |
| OLD | NEW |