Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / test / chromedriver / chrome / navigation_tracker.h
index 08d73bc..e6d198d 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
 #include "chrome/test/chromedriver/chrome/status.h"
 
@@ -17,6 +18,7 @@ namespace base {
 class DictionaryValue;
 }
 
+struct BrowserInfo;
 class DevToolsClient;
 class Status;
 
@@ -29,8 +31,12 @@ class NavigationTracker : public DevToolsEventListener {
     kNotLoading,
   };
 
-  explicit NavigationTracker(DevToolsClient* client);
-  NavigationTracker(DevToolsClient* client, LoadingState known_state);
+  NavigationTracker(DevToolsClient* client, const BrowserInfo* browser_info);
+
+  NavigationTracker(DevToolsClient* client,
+                    LoadingState known_state,
+                    const BrowserInfo* browser_info);
+
   virtual ~NavigationTracker();
 
   // Gets whether a navigation is pending for the specified frame. |frame_id|
@@ -48,8 +54,12 @@ class NavigationTracker : public DevToolsEventListener {
  private:
   DevToolsClient* client_;
   LoadingState loading_state_;
+  const BrowserInfo* browser_info_;
+  int num_frames_pending_;
   std::set<std::string> scheduled_frame_set_;
 
+  void ResetLoadingState(LoadingState loading_state);
+
   DISALLOW_COPY_AND_ASSIGN(NavigationTracker);
 };