Index: chrome/test/chromedriver/session.h |
diff --git a/chrome/test/chromedriver/session.h b/chrome/test/chromedriver/session.h |
index fe837fbf061d252393742ef161326ad3cf8051fe..de01befa090371d847465228163d505cc315242e 100644 |
--- a/chrome/test/chromedriver/session.h |
+++ b/chrome/test/chromedriver/session.h |
@@ -16,6 +16,7 @@ |
#include "chrome/test/chromedriver/basic_types.h" |
#include "chrome/test/chromedriver/chrome/device_metrics.h" |
#include "chrome/test/chromedriver/chrome/geoposition.h" |
+#include "chrome/test/chromedriver/command_listener.h" |
namespace base { |
class DictionaryValue; |
@@ -36,7 +37,7 @@ struct FrameInfo { |
std::string chromedriver_frame_id; |
}; |
-struct Session { |
+struct Session : public CommandListener { |
stgao
2014/06/15 23:54:40
Composite pattern might not be good here.
We'd bet
|
static const base::TimeDelta kDefaultPageLoadTimeout; |
explicit Session(const std::string& id); |
@@ -44,11 +45,13 @@ struct Session { |
~Session(); |
Status GetTargetWindow(WebView** web_view); |
+ virtual Status OnCommand(const std::string& command_name) OVERRIDE; |
void SwitchToTopFrame(); |
void SwitchToParentFrame(); |
void SwitchToSubFrame(const std::string& frame_id, |
const std::string& chromedriver_frame_id); |
+ void AddListener(CommandListener* listener); |
std::string GetCurrentFrameId() const; |
std::vector<WebDriverLog*> GetAllLogs() const; |
std::string GetFirstBrowserError() const; |
@@ -77,6 +80,7 @@ struct Session { |
base::ScopedTempDir temp_dir; |
scoped_ptr<base::DictionaryValue> capabilities; |
bool auto_reporting_enabled; |
+ ScopedVector<CommandListener> command_listeners_; |
}; |
Session* GetThreadLocalSession(); |