| 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" | |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 class DictionaryValue; | 21 class DictionaryValue; |
| 23 } | 22 } |
| 24 | 23 |
| 25 class Chrome; | 24 class Chrome; |
| 26 class Status; | 25 class Status; |
| 27 class WebDriverLog; | 26 class WebDriverLog; |
| 28 class WebView; | 27 class WebView; |
| 29 | 28 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 base::TimeDelta script_timeout; | 70 base::TimeDelta script_timeout; |
| 72 scoped_ptr<std::string> prompt_text; | 71 scoped_ptr<std::string> prompt_text; |
| 73 scoped_ptr<Geoposition> overridden_geoposition; | 72 scoped_ptr<Geoposition> overridden_geoposition; |
| 74 scoped_ptr<DeviceMetrics> overridden_device_metrics; | 73 scoped_ptr<DeviceMetrics> overridden_device_metrics; |
| 75 // Logs that populate from DevTools events. | 74 // Logs that populate from DevTools events. |
| 76 ScopedVector<WebDriverLog> devtools_logs; | 75 ScopedVector<WebDriverLog> devtools_logs; |
| 77 scoped_ptr<WebDriverLog> driver_log; | 76 scoped_ptr<WebDriverLog> driver_log; |
| 78 base::ScopedTempDir temp_dir; | 77 base::ScopedTempDir temp_dir; |
| 79 scoped_ptr<base::DictionaryValue> capabilities; | 78 scoped_ptr<base::DictionaryValue> capabilities; |
| 80 bool auto_reporting_enabled; | 79 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; | |
| 86 }; | 80 }; |
| 87 | 81 |
| 88 Session* GetThreadLocalSession(); | 82 Session* GetThreadLocalSession(); |
| 89 | 83 |
| 90 void SetThreadLocalSession(scoped_ptr<Session> session); | 84 void SetThreadLocalSession(scoped_ptr<Session> session); |
| 91 | 85 |
| 92 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 86 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
| OLD | NEW |