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

Side by Side Diff: chrome/test/chromedriver/frame_tracker.h

Issue 12093057: [ChromeDriver] Send DOM.getDocument after each DOM.documentUpdated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile error on win_rel Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_FRAME_TRACKER_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_FRAME_TRACKER_H_
6 #define CHROME_TEST_CHROMEDRIVER_FRAME_TRACKER_H_ 6 #define CHROME_TEST_CHROMEDRIVER_FRAME_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/test/chromedriver/devtools_event_listener.h" 13 #include "chrome/test/chromedriver/devtools_event_listener.h"
14 14
15 namespace base { 15 namespace base {
16 class DictionaryValue; 16 class DictionaryValue;
17 class Value; 17 class Value;
18 } 18 }
19 19
20 class DevToolsClient;
20 class Status; 21 class Status;
21 22
22 // Tracks execution context creation. 23 // Tracks execution context creation.
23 class FrameTracker : public DevToolsEventListener { 24 class FrameTracker : public DevToolsEventListener {
24 public: 25 public:
25 FrameTracker(); 26 FrameTracker();
26 virtual ~FrameTracker(); 27 virtual ~FrameTracker();
27 28
29 Status Init(DevToolsClient* client);
28 Status GetFrameForContextId(int context_id, std::string* frame_id); 30 Status GetFrameForContextId(int context_id, std::string* frame_id);
29 Status GetContextIdForFrame(const std::string& frame_id, int* context_id); 31 Status GetContextIdForFrame(const std::string& frame_id, int* context_id);
30 32
31 // Overridden from DevToolsEventListener: 33 // Overridden from DevToolsEventListener:
32 virtual void OnEvent(const std::string& method, 34 virtual void OnEvent(const std::string& method,
33 const base::DictionaryValue& params) OVERRIDE; 35 const base::DictionaryValue& params) OVERRIDE;
34 36
35 private: 37 private:
36 std::map<std::string, int> frame_to_context_map_; 38 std::map<std::string, int> frame_to_context_map_;
37 std::map<int, std::string> context_to_frame_map_; 39 std::map<int, std::string> context_to_frame_map_;
38 40
39 DISALLOW_COPY_AND_ASSIGN(FrameTracker); 41 DISALLOW_COPY_AND_ASSIGN(FrameTracker);
40 }; 42 };
41 43
42 #endif // CHROME_TEST_CHROMEDRIVER_FRAME_TRACKER_H_ 44 #endif // CHROME_TEST_CHROMEDRIVER_FRAME_TRACKER_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/dom_tracker_unittest.cc ('k') | chrome/test/chromedriver/frame_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698