OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class Task; | 29 class Task; |
30 class TaskParent; | 30 class TaskParent; |
31 } // namespace talk_base | 31 } // namespace talk_base |
32 | 32 |
33 namespace notifier { | 33 namespace notifier { |
34 | 34 |
35 class ConnectionOptions; | 35 class ConnectionOptions; |
36 class LoginSettings; | 36 class LoginSettings; |
37 struct ServerInformation; | 37 struct ServerInformation; |
38 | 38 |
| 39 // Workaround for MSVS 2005 bug that fails to handle inheritance from a nested |
| 40 // class properly if it comes directly on a base class list. |
| 41 typedef SingleLoginAttempt::Delegate SingleLoginAttemptDelegate; |
| 42 |
39 // Does the login, keeps it alive (with refreshing cookies and reattempting | 43 // Does the login, keeps it alive (with refreshing cookies and reattempting |
40 // login when disconnected), figures out what actions to take on the various | 44 // login when disconnected), figures out what actions to take on the various |
41 // errors that may occur. | 45 // errors that may occur. |
42 class Login : public net::NetworkChangeNotifier::Observer, | 46 class Login : public net::NetworkChangeNotifier::Observer, |
43 public SingleLoginAttempt::Delegate { | 47 public SingleLoginAttemptDelegate { |
44 public: | 48 public: |
45 class Delegate { | 49 class Delegate { |
46 public: | 50 public: |
47 virtual ~Delegate() {} | 51 virtual ~Delegate() {} |
48 | 52 |
49 virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0; | 53 virtual void OnConnect(base::WeakPtr<talk_base::Task> base_task) = 0; |
50 virtual void OnDisconnect() = 0; | 54 virtual void OnDisconnect() = 0; |
51 }; | 55 }; |
52 | 56 |
53 // Does not take ownership of |delegate|, |host_resolver|, or | 57 // Does not take ownership of |delegate|, |host_resolver|, or |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 base::Time redirect_time_; | 103 base::Time redirect_time_; |
100 std::string redirect_server_; | 104 std::string redirect_server_; |
101 int redirect_port_; | 105 int redirect_port_; |
102 | 106 |
103 DISALLOW_COPY_AND_ASSIGN(Login); | 107 DISALLOW_COPY_AND_ASSIGN(Login); |
104 }; | 108 }; |
105 | 109 |
106 } // namespace notifier | 110 } // namespace notifier |
107 | 111 |
108 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ | 112 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ |
OLD | NEW |