| Index: chrome/test/chromedriver/session.cc
|
| diff --git a/chrome/test/chromedriver/session.cc b/chrome/test/chromedriver/session.cc
|
| index d46918e0d0f0d6d6b0529ad87f6edf8aab11012d..63730fd3f245cbf2c9b9d208c2da346eaaceda5b 100644
|
| --- a/chrome/test/chromedriver/session.cc
|
| +++ b/chrome/test/chromedriver/session.cc
|
| @@ -65,6 +65,19 @@ Status Session::GetTargetWindow(WebView** web_view) {
|
| return status;
|
| }
|
|
|
| +Status Session::OnCommand(const std::string& command_name) {
|
| + // Notify listeners of the command.
|
| + for (ScopedVector<CommandListener>::const_iterator it =
|
| + command_listeners_.begin();
|
| + it != command_listeners_.end();
|
| + ++it) {
|
| + Status status = (*it)->OnCommand(command_name);
|
| + if (status.IsError())
|
| + return status;
|
| + }
|
| + return Status(kOk);
|
| +}
|
| +
|
| void Session::SwitchToTopFrame() {
|
| frames.clear();
|
| }
|
| @@ -82,6 +95,11 @@ void Session::SwitchToSubFrame(const std::string& frame_id,
|
| frames.push_back(FrameInfo(parent_frame_id, frame_id, chromedriver_frame_id));
|
| }
|
|
|
| +void Session::AddListener(CommandListener* listener) {
|
| + CHECK(listener);
|
| + command_listeners_.push_back(listener);
|
| +}
|
| +
|
| std::string Session::GetCurrentFrameId() const {
|
| if (frames.empty())
|
| return std::string();
|
|
|