| Index: chrome/browser/automation/testing_automation_provider.h
|
| diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h
|
| index 06a2b1a3557d56dee7fe6e89bd4acf40ebfd536a..112972bb819ddd39f52d6df0cae0e3d7e51e522e 100644
|
| --- a/chrome/browser/automation/testing_automation_provider.h
|
| +++ b/chrome/browser/automation/testing_automation_provider.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
|
| #pragma once
|
|
|
| +#include <list>
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| @@ -17,6 +18,7 @@
|
| #include "chrome/browser/importer/importer_list_observer.h"
|
| #include "chrome/browser/sync/profile_sync_service_harness.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| +#include "content/browser/trace_subscriber_stdio.h"
|
| #include "content/common/notification_registrar.h"
|
| #include "content/common/page_type.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
| @@ -32,7 +34,8 @@ class DictionaryValue;
|
| class TestingAutomationProvider : public AutomationProvider,
|
| public BrowserList::Observer,
|
| public importer::ImporterListObserver,
|
| - public NotificationObserver {
|
| + public NotificationObserver,
|
| + public TraceSubscriber {
|
| public:
|
| explicit TestingAutomationProvider(Profile* profile);
|
|
|
| @@ -54,6 +57,12 @@ class TestingAutomationProvider : public AutomationProvider,
|
| IPC::Message* reply_message;
|
| };
|
|
|
| + // Storage for EndTracing() to resume operations after a callback.
|
| + struct TracingData {
|
| + std::list<std::string> json_output;
|
| + scoped_ptr<IPC::Message> reply_message;
|
| + };
|
| +
|
| virtual ~TestingAutomationProvider();
|
|
|
| // BrowserList::Observer:
|
| @@ -68,6 +77,10 @@ class TestingAutomationProvider : public AutomationProvider,
|
| const NotificationSource& source,
|
| const NotificationDetails& details) OVERRIDE;
|
|
|
| + // TraceSubscriber:
|
| + virtual void OnEndTracingComplete() OVERRIDE;
|
| + virtual void OnTraceDataCollected(const std::string& json_events) OVERRIDE;
|
| +
|
| // IPC Message callbacks.
|
| void CloseBrowser(int handle, IPC::Message* reply_message);
|
| void CloseBrowserAsync(int browser_handle);
|
| @@ -138,6 +151,11 @@ class TestingAutomationProvider : public AutomationProvider,
|
| void IsBrowserInApplicationMode(int handle,
|
| bool* is_application,
|
| bool* success);
|
| + void BeginTracing(const std::vector<std::string>& included_categories,
|
| + const std::vector<std::string>& excluded_categories,
|
| + bool* result);
|
| + void EndTracing(IPC::Message* reply_message);
|
| + void GetTracingOutput(std::string* chunk, int* remaining_chunks);
|
| void GetTab(int win_handle, int tab_index, int* tab_handle);
|
| void GetTabProcessID(int handle, int* process_id);
|
| void GetTabTitle(int handle, int* title_string_size, std::wstring* title);
|
| @@ -1345,6 +1363,9 @@ class TestingAutomationProvider : public AutomationProvider,
|
| // The stored data for the ImportSettings operation.
|
| ImportSettingsData import_settings_data_;
|
|
|
| + // Deferred IPC for EndTracing.
|
| + TracingData tracing_data_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider);
|
| };
|
|
|
|
|