| 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 #include "remoting/host/host_window_proxy.h" | 5 #include "remoting/host/host_window_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 scoped_ptr<HostWindow> host_window); | 23 scoped_ptr<HostWindow> host_window); |
| 24 | 24 |
| 25 // Starts |host_window_| on the |ui_task_runner_| thread. | 25 // Starts |host_window_| on the |ui_task_runner_| thread. |
| 26 void Start(const base::WeakPtr<ClientSessionControl>& client_session_control); | 26 void Start(const base::WeakPtr<ClientSessionControl>& client_session_control); |
| 27 | 27 |
| 28 // Destroys |host_window_| on the |ui_task_runner_| thread. | 28 // Destroys |host_window_| on the |ui_task_runner_| thread. |
| 29 void Stop(); | 29 void Stop(); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 friend class base::RefCountedThreadSafe<Core>; | 32 friend class base::RefCountedThreadSafe<Core>; |
| 33 virtual ~Core(); | 33 ~Core() override; |
| 34 | 34 |
| 35 // Start() and Stop() equivalents called on the |ui_task_runner_| thread. | 35 // Start() and Stop() equivalents called on the |ui_task_runner_| thread. |
| 36 void StartOnUiThread(const std::string& client_jid); | 36 void StartOnUiThread(const std::string& client_jid); |
| 37 void StopOnUiThread(); | 37 void StopOnUiThread(); |
| 38 | 38 |
| 39 // ClientSessionControl interface. | 39 // ClientSessionControl interface. |
| 40 virtual const std::string& client_jid() const override; | 40 const std::string& client_jid() const override; |
| 41 virtual void DisconnectSession() override; | 41 void DisconnectSession() override; |
| 42 virtual void OnLocalMouseMoved( | 42 void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; |
| 43 const webrtc::DesktopVector& position) override; | 43 void SetDisableInputs(bool disable_inputs) override; |
| 44 virtual void SetDisableInputs(bool disable_inputs) override; | 44 void ResetVideoPipeline() override; |
| 45 virtual void ResetVideoPipeline() override; | |
| 46 | 45 |
| 47 // Task runner on which public methods of this class must be called. | 46 // Task runner on which public methods of this class must be called. |
| 48 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; | 47 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; |
| 49 | 48 |
| 50 // Task runner on which |host_window_| is running. | 49 // Task runner on which |host_window_| is running. |
| 51 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 50 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 52 | 51 |
| 53 // Stores the client's JID so it can be read on the |ui_task_runner_| thread. | 52 // Stores the client's JID so it can be read on the |ui_task_runner_| thread. |
| 54 std::string client_jid_; | 53 std::string client_jid_; |
| 55 | 54 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 if (client_session_control_.get()) | 176 if (client_session_control_.get()) |
| 178 client_session_control_->SetDisableInputs(disable_inputs); | 177 client_session_control_->SetDisableInputs(disable_inputs); |
| 179 } | 178 } |
| 180 | 179 |
| 181 void HostWindowProxy::Core::ResetVideoPipeline() { | 180 void HostWindowProxy::Core::ResetVideoPipeline() { |
| 182 // ResetVideoPipeline is only used by HostExtensionSession implementations. | 181 // ResetVideoPipeline is only used by HostExtensionSession implementations. |
| 183 NOTREACHED(); | 182 NOTREACHED(); |
| 184 } | 183 } |
| 185 | 184 |
| 186 } // namespace remoting | 185 } // namespace remoting |
| OLD | NEW |