| 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 CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chrome/test/chromedriver/basic_types.h" | 16 #include "chrome/test/chromedriver/basic_types.h" |
| 17 #include "chrome/test/chromedriver/chrome/device_metrics.h" | 17 #include "chrome/test/chromedriver/chrome/device_metrics.h" |
| 18 #include "chrome/test/chromedriver/chrome/geoposition.h" | 18 #include "chrome/test/chromedriver/chrome/geoposition.h" |
| 19 #include "chrome/test/chromedriver/command_listener.h" |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class DictionaryValue; | 22 class DictionaryValue; |
| 22 } | 23 } |
| 23 | 24 |
| 24 class Chrome; | 25 class Chrome; |
| 25 class Status; | 26 class Status; |
| 26 class WebDriverLog; | 27 class WebDriverLog; |
| 27 class WebView; | 28 class WebView; |
| 28 | 29 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 base::TimeDelta script_timeout; | 71 base::TimeDelta script_timeout; |
| 71 scoped_ptr<std::string> prompt_text; | 72 scoped_ptr<std::string> prompt_text; |
| 72 scoped_ptr<Geoposition> overridden_geoposition; | 73 scoped_ptr<Geoposition> overridden_geoposition; |
| 73 scoped_ptr<DeviceMetrics> overridden_device_metrics; | 74 scoped_ptr<DeviceMetrics> overridden_device_metrics; |
| 74 // Logs that populate from DevTools events. | 75 // Logs that populate from DevTools events. |
| 75 ScopedVector<WebDriverLog> devtools_logs; | 76 ScopedVector<WebDriverLog> devtools_logs; |
| 76 scoped_ptr<WebDriverLog> driver_log; | 77 scoped_ptr<WebDriverLog> driver_log; |
| 77 base::ScopedTempDir temp_dir; | 78 base::ScopedTempDir temp_dir; |
| 78 scoped_ptr<base::DictionaryValue> capabilities; | 79 scoped_ptr<base::DictionaryValue> capabilities; |
| 79 bool auto_reporting_enabled; | 80 bool auto_reporting_enabled; |
| 81 // |command_listeners| should be declared after |chrome|. When the |Session| |
| 82 // is destroyed, |command_listeners| should be freed first, since some |
| 83 // |CommandListener|s might be |CommandListenerProxy|s that forward to |
| 84 // |DevToolsEventListener|s owned by |chrome|. |
| 85 ScopedVector<CommandListener> command_listeners; |
| 80 }; | 86 }; |
| 81 | 87 |
| 82 Session* GetThreadLocalSession(); | 88 Session* GetThreadLocalSession(); |
| 83 | 89 |
| 84 void SetThreadLocalSession(scoped_ptr<Session> session); | 90 void SetThreadLocalSession(scoped_ptr<Session> session); |
| 85 | 91 |
| 86 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 92 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
| OLD | NEW |