| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HOST_USER_INTERFACE_H_ | 5 #ifndef REMOTING_HOST_IT2ME_HOST_USER_INTERFACE_H_ |
| 6 #define REMOTING_HOST_IT2ME_HOST_USER_INTERFACE_H_ | 6 #define REMOTING_HOST_IT2ME_HOST_USER_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" |
| 14 | 15 |
| 15 #include "remoting/host/host_user_interface.h" | 16 #include "remoting/host/host_user_interface.h" |
| 16 | 17 |
| 17 namespace remoting { | 18 namespace remoting { |
| 18 | 19 |
| 19 class ContinueWindow; | 20 class ContinueWindow; |
| 20 | 21 |
| 21 // This class implements the IT2Me-specific parts of the ChromotingHost: | 22 // This class implements the IT2Me-specific parts of the ChromotingHost: |
| 22 // Disconnect and Continue window popups. | 23 // Disconnect and Continue window popups. |
| 23 // IT2Me-specific handling of multiple connection attempts. | 24 // IT2Me-specific handling of multiple connection attempts. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void OnShutdownHostTimer(); | 61 void OnShutdownHostTimer(); |
| 61 | 62 |
| 62 // Show or hide the Continue Sharing window on the UI thread. | 63 // Show or hide the Continue Sharing window on the UI thread. |
| 63 void ShowContinueWindow(bool show); | 64 void ShowContinueWindow(bool show); |
| 64 void StartContinueWindowTimer(bool start); | 65 void StartContinueWindowTimer(bool start); |
| 65 | 66 |
| 66 // Provide a user interface requiring the user to periodically re-confirm | 67 // Provide a user interface requiring the user to periodically re-confirm |
| 67 // the connection. | 68 // the connection. |
| 68 scoped_ptr<ContinueWindow> continue_window_; | 69 scoped_ptr<ContinueWindow> continue_window_; |
| 69 | 70 |
| 70 // Timer controlling the "continue session" dialog. | 71 // Weak pointer factory used to abandon the "continue session" timer when |
| 71 scoped_ptr<TimerTask> timer_task_; | 72 // hiding the "continue session" dialog, or tearing down the IT2Me UI. |
| 73 base::WeakPtrFactory<It2MeHostUserInterface> timer_weak_factory_; |
| 72 | 74 |
| 73 DISALLOW_COPY_AND_ASSIGN(It2MeHostUserInterface); | 75 DISALLOW_COPY_AND_ASSIGN(It2MeHostUserInterface); |
| 74 }; | 76 }; |
| 75 | 77 |
| 76 } // namespace remoting | 78 } // namespace remoting |
| 77 | 79 |
| 78 #endif // REMOTING_HOST_IT2ME_HOST_USER_INTERFACE_H_ | 80 #endif // REMOTING_HOST_IT2ME_HOST_USER_INTERFACE_H_ |
| OLD | NEW |