Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4587)

Unified Diff: chrome/test/chromedriver/session.h

Issue 353063005: [ChromeDriver] Subscribe PerformanceLogger to CommandListener interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/session.h
diff --git a/chrome/test/chromedriver/session.h b/chrome/test/chromedriver/session.h
index fe837fbf061d252393742ef161326ad3cf8051fe..cebcb51d8573e26cdbaf4a1a0651f0c9d73d0265 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;
@@ -49,6 +50,7 @@ struct Session {
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 +79,11 @@ struct Session {
base::ScopedTempDir temp_dir;
scoped_ptr<base::DictionaryValue> capabilities;
bool auto_reporting_enabled;
+ // command_listeners should be declared after chrome. When the Session is
stgao 2014/06/27 16:48:25 When referring a variable or a class, usually we w
johnmoore 2014/06/27 21:58:03 Done.
+ // destroyed, command_listeners should be freed first, since some
+ // CommandListeners might be CommandListenerProxys that forward to
+ // DevToolsEventListeners owned by chrome.
+ ScopedVector<CommandListener> command_listeners;
};
Session* GetThreadLocalSession();

Powered by Google App Engine
This is Rietveld 408576698