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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.h

Issue 11971025: [sync] Divorce python sync test server chromiumsync.py from testserver.py (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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/browser/automation/automation_event_observers.h" 15 #include "chrome/browser/automation/automation_event_observers.h"
16 #include "chrome/browser/automation/automation_event_queue.h" 16 #include "chrome/browser/automation/automation_event_queue.h"
17 #include "chrome/browser/automation/automation_provider.h" 17 #include "chrome/browser/automation/automation_provider.h"
18 #include "chrome/browser/automation/automation_provider_json.h" 18 #include "chrome/browser/automation/automation_provider_json.h"
19 #include "chrome/browser/history/history.h" 19 #include "chrome/browser/history/history.h"
20 #include "chrome/browser/importer/importer_list_observer.h" 20 #include "chrome/browser/importer/importer_list_observer.h"
21 #include "chrome/browser/sync/profile_sync_service_harness.h"
22 #include "chrome/browser/ui/browser_list_observer.h" 21 #include "chrome/browser/ui/browser_list_observer.h"
23 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
24 #include "content/public/common/page_type.h" 23 #include "content/public/common/page_type.h"
25 #include "content/public/common/security_style.h" 24 #include "content/public/common/security_style.h"
26 #include "net/base/cert_status_flags.h" 25 #include "net/base/cert_status_flags.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
28 27
29 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
30 // TODO(sque): move to a ChromeOS-specific class. See crosbug.com/22081. 29 // TODO(sque): move to a ChromeOS-specific class. See crosbug.com/22081.
31 class PowerManagerClientObserverForTesting; 30 class PowerManagerClientObserverForTesting;
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 void OpenFindInPage(base::DictionaryValue* args, 557 void OpenFindInPage(base::DictionaryValue* args,
559 IPC::Message* reply_message); 558 IPC::Message* reply_message);
560 559
561 // Returns whether the find request dialogue is visible in the given browser. 560 // Returns whether the find request dialogue is visible in the given browser.
562 // Example: 561 // Example:
563 // input: { "windex": 1 } 562 // input: { "windex": 1 }
564 // output: { "is_visible": true } 563 // output: { "is_visible": true }
565 void IsFindInPageVisible(base::DictionaryValue* args, 564 void IsFindInPageVisible(base::DictionaryValue* args,
566 IPC::Message* reply_message); 565 IPC::Message* reply_message);
567 566
568 // Signs in to sync using the given username and password.
569 // Uses the JSON interface for input/output.
570 void SignInToSync(Browser* browser,
571 base::DictionaryValue* args,
572 IPC::Message* reply_message);
573
574 // Returns info about sync.
575 // Uses the JSON interface for input/output.
576 void GetSyncInfo(Browser* browser,
577 base::DictionaryValue* args,
578 IPC::Message* reply_message);
579
580 // Waits for the ongoing sync cycle to complete.
581 // Uses the JSON interface for input/output.
582 void AwaitFullSyncCompletion(Browser* browser,
583 base::DictionaryValue* args,
584 IPC::Message* reply_message);
585
586 // Waits for sync to reinitialize (for example, after a browser restart).
587 // Uses the JSON interface for input/output.
588 void AwaitSyncRestart(Browser* browser,
589 base::DictionaryValue* args,
590 IPC::Message* reply_message);
591
592 // Enables sync for one or more sync datatypes.
593 // Uses the JSON interface for input/output.
594 void EnableSyncForDatatypes(Browser* browser,
595 base::DictionaryValue* args,
596 IPC::Message* reply_message);
597
598 // Disables sync for one or more sync datatypes.
599 // Uses the JSON interface for input/output.
600 void DisableSyncForDatatypes(Browser* browser,
601 base::DictionaryValue* args,
602 IPC::Message* reply_message);
603
604 // Get ordered list of all active and queued HTML5 notifications. 567 // Get ordered list of all active and queued HTML5 notifications.
605 // Uses the JSON interface for input/output. 568 // Uses the JSON interface for input/output.
606 void GetAllNotifications(Browser* browser, 569 void GetAllNotifications(Browser* browser,
607 base::DictionaryValue* args, 570 base::DictionaryValue* args,
608 IPC::Message* reply_message); 571 IPC::Message* reply_message);
609 572
610 // Close an active HTML5 notification. 573 // Close an active HTML5 notification.
611 // Uses the JSON interface for input/output. 574 // Uses the JSON interface for input/output.
612 void CloseNotification(Browser* browser, 575 void CloseNotification(Browser* browser,
613 base::DictionaryValue* args, 576 base::DictionaryValue* args,
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 1515
1553 #if defined(OS_CHROMEOS) 1516 #if defined(OS_CHROMEOS)
1554 // Avoid scoped ptr here to avoid having to define it completely in the 1517 // Avoid scoped ptr here to avoid having to define it completely in the
1555 // non-ChromeOS code. 1518 // non-ChromeOS code.
1556 PowerManagerClientObserverForTesting* power_manager_observer_; 1519 PowerManagerClientObserverForTesting* power_manager_observer_;
1557 #endif // defined(OS_CHROMEOS) 1520 #endif // defined(OS_CHROMEOS)
1558 1521
1559 std::map<std::string, JsonHandler> handler_map_; 1522 std::map<std::string, JsonHandler> handler_map_;
1560 std::map<std::string, BrowserJsonHandler> browser_handler_map_; 1523 std::map<std::string, BrowserJsonHandler> browser_handler_map_;
1561 1524
1562 // Used to wait on various browser sync events.
1563 scoped_ptr<ProfileSyncServiceHarness> sync_waiter_;
1564
1565 content::NotificationRegistrar registrar_; 1525 content::NotificationRegistrar registrar_;
1566 1526
1567 // Used to enumerate browser profiles. 1527 // Used to enumerate browser profiles.
1568 scoped_refptr<ImporterList> importer_list_; 1528 scoped_refptr<ImporterList> importer_list_;
1569 1529
1570 // The stored data for the ImportSettings operation. 1530 // The stored data for the ImportSettings operation.
1571 ImportSettingsData import_settings_data_; 1531 ImportSettingsData import_settings_data_;
1572 1532
1573 // The automation event observer queue. It is lazily created when an observer 1533 // The automation event observer queue. It is lazily created when an observer
1574 // is added to avoid overhead when not needed. 1534 // is added to avoid overhead when not needed.
1575 scoped_ptr<AutomationEventQueue> automation_event_queue_; 1535 scoped_ptr<AutomationEventQueue> automation_event_queue_;
1576 1536
1577 // List of commands which just finish synchronously and don't require 1537 // List of commands which just finish synchronously and don't require
1578 // setting up an observer. 1538 // setting up an observer.
1579 static const int kSynchronousCommands[]; 1539 static const int kSynchronousCommands[];
1580 1540
1581 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); 1541 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider);
1582 }; 1542 };
1583 1543
1584 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 1544 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « build/android/pylib/chrome_test_server_spawner.py ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698