Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_CAPABILITIES_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ |
| 6 #define CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 void AppendToCommandLine(base::CommandLine* command) const; | 53 void AppendToCommandLine(base::CommandLine* command) const; |
| 54 std::string ToString() const; | 54 std::string ToString() const; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 typedef std::map<std::string, NativeString> SwitchMap; | 57 typedef std::map<std::string, NativeString> SwitchMap; |
| 58 SwitchMap switch_map_; | 58 SwitchMap switch_map_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 typedef std::map<std::string, Log::Level> LoggingPrefs; | 61 typedef std::map<std::string, Log::Level> LoggingPrefs; |
| 62 | 62 |
| 63 struct PerfLoggingPrefs { | |
| 64 PerfLoggingPrefs(); | |
| 65 ~PerfLoggingPrefs(); | |
|
samuong
2014/08/04 06:08:22
This probably doesn't matter since no one will eve
johnmoore
2014/08/04 17:37:57
For consistency, I think we shouldn't, since neith
| |
| 66 | |
| 67 // We must distinguish between a log domain being set by default and being | |
| 68 // explicitly set. Otherwise, |PerformanceLogger| could only handle 3 of 4 | |
| 69 // possible combinations (tracing enabled/disabled + Timeline on/off). | |
| 70 enum InspectorDomainStatus { | |
| 71 kDefaultEnabled, // enabled by default | |
| 72 kDefaultDisabled, // disabled by default | |
| 73 kExplicitlyEnabled, // explicitly enabled | |
| 74 kExplicitlyDisabled // explicitly disabled | |
|
samuong
2014/08/04 06:08:22
I think people will be able to figure out what the
johnmoore
2014/08/04 17:37:57
Done.
| |
| 75 }; | |
| 76 | |
| 77 // True if |domain_status| is kDefaultEnabled or kExplicitlyEnabled. | |
| 78 static bool IsEnabled(const InspectorDomainStatus& domain_status); | |
|
samuong
2014/08/04 06:08:22
structs aren't usually supposed to have any logic
johnmoore
2014/08/04 17:37:58
Done.
| |
| 79 | |
| 80 InspectorDomainStatus network; | |
| 81 InspectorDomainStatus page; | |
| 82 InspectorDomainStatus timeline; | |
| 83 | |
| 84 std::string trace_categories; // Non-empty string enables tracing. | |
| 85 }; | |
| 86 | |
| 63 struct Capabilities { | 87 struct Capabilities { |
| 64 Capabilities(); | 88 Capabilities(); |
| 65 ~Capabilities(); | 89 ~Capabilities(); |
| 66 | 90 |
| 67 // Return true if remote host:port session is to be used. | 91 // Return true if remote host:port session is to be used. |
| 68 bool IsRemoteBrowser() const; | 92 bool IsRemoteBrowser() const; |
| 69 | 93 |
| 70 // Return true if android package is specified. | 94 // Return true if android package is specified. |
| 71 bool IsAndroid() const; | 95 bool IsAndroid() const; |
| 72 | 96 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 | 131 |
| 108 scoped_ptr<base::DictionaryValue> local_state; | 132 scoped_ptr<base::DictionaryValue> local_state; |
| 109 | 133 |
| 110 std::string log_path; | 134 std::string log_path; |
| 111 | 135 |
| 112 LoggingPrefs logging_prefs; | 136 LoggingPrefs logging_prefs; |
| 113 | 137 |
| 114 // If set, enable minidump for chrome crashes and save to this directory. | 138 // If set, enable minidump for chrome crashes and save to this directory. |
| 115 std::string minidump_path; | 139 std::string minidump_path; |
| 116 | 140 |
| 141 PerfLoggingPrefs perf_logging_prefs; | |
| 142 | |
| 117 scoped_ptr<base::DictionaryValue> prefs; | 143 scoped_ptr<base::DictionaryValue> prefs; |
| 118 | 144 |
| 119 Switches switches; | 145 Switches switches; |
| 120 }; | 146 }; |
| 121 | 147 |
| 122 #endif // CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ | 148 #endif // CHROME_TEST_CHROMEDRIVER_CAPABILITIES_H_ |
| OLD | NEW |