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

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

Issue 14263024: Logging API in chromedriver2. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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
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_CHROME_CHROME_IMPL_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_ 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/test/chromedriver/chrome/chrome.h" 14 #include "chrome/test/chromedriver/chrome/chrome.h"
15 15
16 class AutomationExtension; 16 class AutomationExtension;
17 class DevToolsEventLogger;
17 class DevToolsHttpClient; 18 class DevToolsHttpClient;
18 class JavaScriptDialogManager; 19 class JavaScriptDialogManager;
19 class Status; 20 class Status;
20 class WebView; 21 class WebView;
21 class WebViewImpl; 22 class WebViewImpl;
22 23
23 class ChromeImpl : public Chrome { 24 class ChromeImpl : public Chrome {
24 public: 25 public:
25 virtual ~ChromeImpl(); 26 virtual ~ChromeImpl();
26 27
27 // Overridden from Chrome: 28 // Overridden from Chrome:
28 virtual std::string GetVersion() OVERRIDE; 29 virtual std::string GetVersion() OVERRIDE;
29 virtual int GetBuildNo() OVERRIDE; 30 virtual int GetBuildNo() OVERRIDE;
30 virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) OVERRIDE; 31 virtual Status GetWebViewIds(std::list<std::string>* web_view_ids) OVERRIDE;
31 virtual Status GetWebViewById(const std::string& id, 32 virtual Status GetWebViewById(const std::string& id,
32 WebView** web_view) OVERRIDE; 33 WebView** web_view) OVERRIDE;
33 virtual Status CloseWebView(const std::string& id) OVERRIDE; 34 virtual Status CloseWebView(const std::string& id) OVERRIDE;
34 virtual Status IsJavaScriptDialogOpen(bool* is_open) OVERRIDE; 35 virtual Status IsJavaScriptDialogOpen(bool* is_open) OVERRIDE;
35 virtual Status GetJavaScriptDialogMessage(std::string* message) OVERRIDE; 36 virtual Status GetJavaScriptDialogMessage(std::string* message) OVERRIDE;
36 virtual Status HandleJavaScriptDialog( 37 virtual Status HandleJavaScriptDialog(
37 bool accept, 38 bool accept,
38 const std::string& prompt_text) OVERRIDE; 39 const std::string& prompt_text) OVERRIDE;
39 virtual Status GetAutomationExtension( 40 virtual Status GetAutomationExtension(
40 AutomationExtension** extension) OVERRIDE; 41 AutomationExtension** extension) OVERRIDE;
41 42
42 protected: 43 protected:
43 ChromeImpl(scoped_ptr<DevToolsHttpClient> client, 44 ChromeImpl(scoped_ptr<DevToolsHttpClient> client,
44 const std::string& version, 45 const std::string& version,
45 int build_no); 46 int build_no,
47 const std::list<DevToolsEventLogger*>& devtools_event_loggers);
46 48
47 scoped_ptr<DevToolsHttpClient> devtools_http_client_; 49 scoped_ptr<DevToolsHttpClient> devtools_http_client_;
48 50
49 private: 51 private:
50 typedef std::list<linked_ptr<WebViewImpl> > WebViewList; 52 typedef std::list<linked_ptr<WebViewImpl> > WebViewList;
51 53
52 Status GetDialogManagerForOpenDialog(JavaScriptDialogManager** manager); 54 Status GetDialogManagerForOpenDialog(JavaScriptDialogManager** manager);
53 55
54 std::string version_; 56 std::string version_;
55 int build_no_; 57 int build_no_;
56 58
57 // Web views in this list are in the same order as they are opened. 59 // Web views in this list are in the same order as they are opened.
58 WebViewList web_views_; 60 WebViewList web_views_;
61 std::list<DevToolsEventLogger*> devtools_event_loggers_;
59 }; 62 };
60 63
61 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_ 64 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CHROME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698