| 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_SETUP_WIN_AUTH_CODE_GETTER_H | 5 #ifndef REMOTING_HOST_SETUP_WIN_AUTH_CODE_GETTER_H |
| 6 #define REMOTING_HOST_SETUP_WIN_AUTH_CODE_GETTER_H | 6 #define REMOTING_HOST_SETUP_WIN_AUTH_CODE_GETTER_H |
| 7 | 7 |
| 8 #include <ole2.h> | 8 #include <ole2.h> |
| 9 #include <exdisp.h> | 9 #include <exdisp.h> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Returns whether to stop polling the browser's URL. If true, then | 36 // Returns whether to stop polling the browser's URL. If true, then |
| 37 // |auth_code| is an authorization code, or the empty string on an error. | 37 // |auth_code| is an authorization code, or the empty string on an error. |
| 38 bool TestBrowserUrl(std::string* auth_code); | 38 bool TestBrowserUrl(std::string* auth_code); |
| 39 // Kills the browser. | 39 // Kills the browser. |
| 40 void KillBrowser(); | 40 void KillBrowser(); |
| 41 | 41 |
| 42 // The authorization code callback. | 42 // The authorization code callback. |
| 43 base::Callback<void(const std::string&)> on_auth_code_; | 43 base::Callback<void(const std::string&)> on_auth_code_; |
| 44 // The browser through which the user requests an authorization code. | 44 // The browser through which the user requests an authorization code. |
| 45 base::win::ScopedComPtr<IWebBrowser2, &IID_IWebBrowser2> browser_; | 45 base::win::ScopedComPtr<IWebBrowser2, &IID_IWebBrowser2> browser_; |
| 46 // Whether the browser is running. | |
| 47 bool browser_running_; | |
| 48 // A timer used to poll the browser's URL. | 46 // A timer used to poll the browser's URL. |
| 49 base::OneShotTimer<AuthCodeGetter> timer_; | 47 base::OneShotTimer<AuthCodeGetter> timer_; |
| 50 // The interval at which the timer fires. | 48 // The interval at which the timer fires. |
| 51 base::TimeDelta timer_interval_; | 49 base::TimeDelta timer_interval_; |
| 52 | 50 |
| 53 DISALLOW_COPY_AND_ASSIGN(AuthCodeGetter); | 51 DISALLOW_COPY_AND_ASSIGN(AuthCodeGetter); |
| 54 }; | 52 }; |
| 55 | 53 |
| 56 } // namespace remoting | 54 } // namespace remoting |
| 57 | 55 |
| 58 #endif // REMOTING_HOST_SETUP_WIN_AUTH_CODE_GETTER_H | 56 #endif // REMOTING_HOST_SETUP_WIN_AUTH_CODE_GETTER_H |
| OLD | NEW |