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

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

Issue 11639019: [chromedriver] Implement SwitchToFrame command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
« no previous file with comments | « chrome/test/chromedriver/commands_unittest.cc ('k') | chrome/test/chromedriver/dom_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_CHROMEDRIVER_DOM_TRACKER_H_
6 #define CHROME_TEST_CHROMEDRIVER_DOM_TRACKER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "chrome/test/chromedriver/devtools_event_listener.h"
14
15 namespace base {
16 class DictionaryValue;
17 class Value;
18 }
19
20 class Status;
21
22 // Tracks the state of the DOM and execution context creation.
23 class DomTracker : public DevToolsEventListener {
24 public:
25 DomTracker();
26 virtual ~DomTracker();
27
28 Status GetFrameIdForNode(int node_id, std::string* frame_id);
29 Status GetContextIdForFrame(const std::string& frame_id, int* context_id);
30
31 // Overridden from DevToolsEventListener:
32 virtual void OnEvent(const std::string& method,
33 const base::DictionaryValue& params) OVERRIDE;
34
35 private:
36 bool ProcessNodeList(const base::Value* nodes);
37 bool ProcessNode(const base::Value* node);
38
39 typedef std::map<int, std::string> NodeToFrameMap;
40 typedef std::map<std::string, int> FrameToContextMap;
41 NodeToFrameMap node_to_frame_map_;
42 FrameToContextMap frame_to_context_map_;
43
44 DISALLOW_COPY_AND_ASSIGN(DomTracker);
45 };
46
47 #endif // CHROME_TEST_CHROMEDRIVER_DOM_TRACKER_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/commands_unittest.cc ('k') | chrome/test/chromedriver/dom_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698