OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "chrome/browser/automation/automation_provider.h" | 10 #include "chrome/browser/automation/automation_provider.h" |
11 #include "chrome/browser/browser_list.h" | 11 #include "chrome/browser/browser_list.h" |
12 #include "chrome/browser/history/history.h" | 12 #include "chrome/browser/history/history.h" |
13 #include "chrome/common/notification_registrar.h" | 13 #include "chrome/common/notification_registrar.h" |
| 14 #include "chrome/common/page_type.h" |
14 | 15 |
15 class DictionaryValue; | 16 class DictionaryValue; |
16 class TemplateURLModel; | 17 class TemplateURLModel; |
17 | 18 |
18 // This is an automation provider containing testing calls. | 19 // This is an automation provider containing testing calls. |
19 class TestingAutomationProvider : public AutomationProvider, | 20 class TestingAutomationProvider : public AutomationProvider, |
20 public BrowserList::Observer, | 21 public BrowserList::Observer, |
21 public NotificationObserver { | 22 public NotificationObserver { |
22 public: | 23 public: |
23 explicit TestingAutomationProvider(Profile* profile); | 24 explicit TestingAutomationProvider(Profile* profile); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 void HideInterstitialPage(int tab_handle, bool* success); | 191 void HideInterstitialPage(int tab_handle, bool* success); |
191 | 192 |
192 void WaitForTabToBeRestored(int tab_handle, IPC::Message* reply_message); | 193 void WaitForTabToBeRestored(int tab_handle, IPC::Message* reply_message); |
193 | 194 |
194 // Gets the security state for the tab associated to the specified |handle|. | 195 // Gets the security state for the tab associated to the specified |handle|. |
195 void GetSecurityState(int handle, bool* success, | 196 void GetSecurityState(int handle, bool* success, |
196 SecurityStyle* security_style, int* ssl_cert_status, | 197 SecurityStyle* security_style, int* ssl_cert_status, |
197 int* insecure_content_status); | 198 int* insecure_content_status); |
198 | 199 |
199 // Gets the page type for the tab associated to the specified |handle|. | 200 // Gets the page type for the tab associated to the specified |handle|. |
200 void GetPageType(int handle, bool* success, | 201 void GetPageType(int handle, bool* success, PageType* page_type); |
201 NavigationEntry::PageType* page_type); | |
202 | 202 |
203 // Gets the duration in ms of the last event matching |event_name|. | 203 // Gets the duration in ms of the last event matching |event_name|. |
204 // |duration_ms| is -1 if the event hasn't occurred yet. | 204 // |duration_ms| is -1 if the event hasn't occurred yet. |
205 void GetMetricEventDuration(const std::string& event_name, int* duration_ms); | 205 void GetMetricEventDuration(const std::string& event_name, int* duration_ms); |
206 | 206 |
207 // Simulates an action on the SSL blocking page at the tab specified by | 207 // Simulates an action on the SSL blocking page at the tab specified by |
208 // |handle|. If |proceed| is true, it is equivalent to the user pressing the | 208 // |handle|. If |proceed| is true, it is equivalent to the user pressing the |
209 // 'Proceed' button, if false the 'Get me out of there button'. | 209 // 'Proceed' button, if false the 'Get me out of there button'. |
210 // Not that this fails if the tab is not displaying a SSL blocking page. | 210 // Not that this fails if the tab is not displaying a SSL blocking page. |
211 void ActionOnSSLBlockingPage(int handle, | 211 void ActionOnSSLBlockingPage(int handle, |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 // for the results) so there is only one handle. When non-0, indicates a | 707 // for the results) so there is only one handle. When non-0, indicates a |
708 // query in progress. | 708 // query in progress. |
709 HistoryService::Handle redirect_query_; | 709 HistoryService::Handle redirect_query_; |
710 | 710 |
711 NotificationRegistrar registrar_; | 711 NotificationRegistrar registrar_; |
712 | 712 |
713 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 713 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
714 }; | 714 }; |
715 | 715 |
716 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 716 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |