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

Side by Side Diff: chrome/test/chromedriver/session.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/run_py_tests.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_SESSION_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_SESSION_H_
6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_ 6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 14
15 class Chrome; 15 class Chrome;
16 16
17 struct Session { 17 struct Session {
18 explicit Session(const std::string& id); 18 explicit Session(const std::string& id);
19 Session(const std::string& id, scoped_ptr<Chrome> chrome); 19 Session(const std::string& id, scoped_ptr<Chrome> chrome);
20 ~Session(); 20 ~Session();
21 21
22 const std::string id; 22 const std::string id;
23 scoped_ptr<Chrome> chrome; 23 scoped_ptr<Chrome> chrome;
24 std::string frame;
24 }; 25 };
25 26
26 class SessionAccessor : public base::RefCountedThreadSafe<SessionAccessor> { 27 class SessionAccessor : public base::RefCountedThreadSafe<SessionAccessor> {
27 public: 28 public:
28 virtual Session* Access(scoped_ptr<base::AutoLock>* lock) = 0; 29 virtual Session* Access(scoped_ptr<base::AutoLock>* lock) = 0;
29 30
30 protected: 31 protected:
31 friend class base::RefCountedThreadSafe<SessionAccessor>; 32 friend class base::RefCountedThreadSafe<SessionAccessor>;
32 virtual ~SessionAccessor() {} 33 virtual ~SessionAccessor() {}
33 }; 34 };
34 35
35 class SessionAccessorImpl : public SessionAccessor { 36 class SessionAccessorImpl : public SessionAccessor {
36 public: 37 public:
37 explicit SessionAccessorImpl(scoped_ptr<Session> session); 38 explicit SessionAccessorImpl(scoped_ptr<Session> session);
38 39
39 virtual Session* Access(scoped_ptr<base::AutoLock>* lock) OVERRIDE; 40 virtual Session* Access(scoped_ptr<base::AutoLock>* lock) OVERRIDE;
40 41
41 private: 42 private:
42 virtual ~SessionAccessorImpl(); 43 virtual ~SessionAccessorImpl();
43 44
44 base::Lock session_lock_; 45 base::Lock session_lock_;
45 scoped_ptr<Session> session_; 46 scoped_ptr<Session> session_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(SessionAccessorImpl); 48 DISALLOW_COPY_AND_ASSIGN(SessionAccessorImpl);
48 }; 49 };
49 50
50 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ 51 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/run_py_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698