| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/automation/automation_provider.h" | 14 #include "chrome/browser/automation/automation_provider.h" |
| 15 #include "chrome/browser/automation/automation_provider_json.h" | 15 #include "chrome/browser/automation/automation_provider_json.h" |
| 16 #include "chrome/browser/history/history.h" | 16 #include "chrome/browser/history/history.h" |
| 17 #include "chrome/browser/importer/importer_list.h" | 17 #include "chrome/browser/importer/importer_list.h" |
| 18 #include "chrome/browser/sync/profile_sync_service_harness.h" | 18 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 19 #include "chrome/browser/ui/browser_list.h" | 19 #include "chrome/browser/ui/browser_list.h" |
| 20 #include "content/common/notification_registrar.h" | 20 #include "content/common/notification_registrar.h" |
| 21 #include "content/common/page_type.h" | 21 #include "content/common/page_type.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 23 | 23 |
| 24 class TemplateURLService; |
| 25 |
| 26 namespace base { |
| 24 class DictionaryValue; | 27 class DictionaryValue; |
| 25 class TemplateURLService; | 28 } |
| 26 | 29 |
| 27 // This is an automation provider containing testing calls. | 30 // This is an automation provider containing testing calls. |
| 28 class TestingAutomationProvider : public AutomationProvider, | 31 class TestingAutomationProvider : public AutomationProvider, |
| 29 public BrowserList::Observer, | 32 public BrowserList::Observer, |
| 30 public ImporterList::Observer, | 33 public ImporterList::Observer, |
| 31 public NotificationObserver { | 34 public NotificationObserver { |
| 32 public: | 35 public: |
| 33 explicit TestingAutomationProvider(Profile* profile); | 36 explicit TestingAutomationProvider(Profile* profile); |
| 34 | 37 |
| 35 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); | 38 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 void GetBlockedPopupCount(int handle, int* count); | 347 void GetBlockedPopupCount(int handle, int* count); |
| 345 | 348 |
| 346 // Generic pattern for pyautolib | 349 // Generic pattern for pyautolib |
| 347 // Uses the JSON interface for input/output. | 350 // Uses the JSON interface for input/output. |
| 348 void SendJSONRequest(int handle, | 351 void SendJSONRequest(int handle, |
| 349 const std::string& json_request, | 352 const std::string& json_request, |
| 350 IPC::Message* reply_message); | 353 IPC::Message* reply_message); |
| 351 | 354 |
| 352 // Method ptr for json handlers. | 355 // Method ptr for json handlers. |
| 353 // Uses the JSON interface for input/output. | 356 // Uses the JSON interface for input/output. |
| 354 typedef void (TestingAutomationProvider::*JsonHandler)(DictionaryValue*, | 357 typedef void (TestingAutomationProvider::*JsonHandler)(base::DictionaryValue*, |
| 355 IPC::Message*); | 358 IPC::Message*); |
| 356 | 359 |
| 357 // Method ptr for json handlers that take a browser argument. | 360 // Method ptr for json handlers that take a browser argument. |
| 358 // Uses the JSON interface for input/output. | 361 // Uses the JSON interface for input/output. |
| 359 typedef void (TestingAutomationProvider::*BrowserJsonHandler)( | 362 typedef void (TestingAutomationProvider::*BrowserJsonHandler)( |
| 360 Browser* browser, | 363 Browser* browser, |
| 361 DictionaryValue*, | 364 base::DictionaryValue*, |
| 362 IPC::Message*); | 365 IPC::Message*); |
| 363 | 366 |
| 364 // Set window dimensions. | 367 // Set window dimensions. |
| 365 // Uses the JSON interface for input/output. | 368 // Uses the JSON interface for input/output. |
| 366 void SetWindowDimensions(Browser* browser, | 369 void SetWindowDimensions(Browser* browser, |
| 367 DictionaryValue* args, | 370 base::DictionaryValue* args, |
| 368 IPC::Message* reply_message); | 371 IPC::Message* reply_message); |
| 369 | 372 |
| 370 // Get info about infobars in the given TabContents object. | 373 // Get info about infobars in the given TabContents object. |
| 371 // This includes info about the type of infobars, the message text, | 374 // This includes info about the type of infobars, the message text, |
| 372 // buttons, etc. | 375 // buttons, etc. |
| 373 // Caller owns the returned object. | 376 // Caller owns the returned object. |
| 374 ListValue* GetInfobarsInfo(TabContents* tc); | 377 ListValue* GetInfobarsInfo(TabContents* tc); |
| 375 | 378 |
| 376 // Perform actions on an infobar like dismiss, accept, cancel. | 379 // Perform actions on an infobar like dismiss, accept, cancel. |
| 377 // Uses the JSON interface for input/output. | 380 // Uses the JSON interface for input/output. |
| 378 void PerformActionOnInfobar(Browser* browser, | 381 void PerformActionOnInfobar(Browser* browser, |
| 379 DictionaryValue* args, | 382 base::DictionaryValue* args, |
| 380 IPC::Message* reply_message); | 383 IPC::Message* reply_message); |
| 381 | 384 |
| 382 // Get info about the chromium/chrome in use. | 385 // Get info about the chromium/chrome in use. |
| 383 // This includes things like version, executable name, executable path. | 386 // This includes things like version, executable name, executable path. |
| 384 // Uses the JSON interface for input/output. | 387 // Uses the JSON interface for input/output. |
| 385 void GetBrowserInfo(Browser* browser, | 388 void GetBrowserInfo(Browser* browser, |
| 386 DictionaryValue* args, | 389 base::DictionaryValue* args, |
| 387 IPC::Message* reply_message); | 390 IPC::Message* reply_message); |
| 388 | 391 |
| 389 // Get info about the state of navigation in a given tab. | 392 // Get info about the state of navigation in a given tab. |
| 390 // This includes ssl info. | 393 // This includes ssl info. |
| 391 // Uses the JSON interface for input/output. | 394 // Uses the JSON interface for input/output. |
| 392 void GetNavigationInfo(Browser* browser, | 395 void GetNavigationInfo(Browser* browser, |
| 393 DictionaryValue* args, | 396 base::DictionaryValue* args, |
| 394 IPC::Message* reply_message); | 397 IPC::Message* reply_message); |
| 395 | 398 |
| 396 // Get info about downloads. This includes only ones that have been | 399 // Get info about downloads. This includes only ones that have been |
| 397 // registered by the history system. | 400 // registered by the history system. |
| 398 // Uses the JSON interface for input/output. | 401 // Uses the JSON interface for input/output. |
| 399 void GetDownloadsInfo(Browser* browser, | 402 void GetDownloadsInfo(Browser* browser, |
| 400 DictionaryValue* args, | 403 base::DictionaryValue* args, |
| 401 IPC::Message* reply_message); | 404 IPC::Message* reply_message); |
| 402 | 405 |
| 403 // Wait for all downloads to complete. | 406 // Wait for all downloads to complete. |
| 404 // Uses the JSON interface for input/output. | 407 // Uses the JSON interface for input/output. |
| 405 void WaitForDownloadsToComplete(Browser* browser, | 408 void WaitForDownloadsToComplete(Browser* browser, |
| 406 DictionaryValue* args, | 409 base::DictionaryValue* args, |
| 407 IPC::Message* reply_message); | 410 IPC::Message* reply_message); |
| 408 | 411 |
| 409 // Performs the given action on the specified download. | 412 // Performs the given action on the specified download. |
| 410 // Uses the JSON interface for input/output. | 413 // Uses the JSON interface for input/output. |
| 411 void PerformActionOnDownload(Browser* browser, | 414 void PerformActionOnDownload(Browser* browser, |
| 412 DictionaryValue* args, | 415 base::DictionaryValue* args, |
| 413 IPC::Message* reply_message); | 416 IPC::Message* reply_message); |
| 414 | 417 |
| 415 // Get info about history. | 418 // Get info about history. |
| 416 // Uses the JSON interface for input/output. | 419 // Uses the JSON interface for input/output. |
| 417 void GetHistoryInfo(Browser* browser, | 420 void GetHistoryInfo(Browser* browser, |
| 418 DictionaryValue* args, | 421 base::DictionaryValue* args, |
| 419 IPC::Message* reply_message); | 422 IPC::Message* reply_message); |
| 420 | 423 |
| 421 // Add an item to the history service. | 424 // Add an item to the history service. |
| 422 // Uses the JSON interface for input/output. | 425 // Uses the JSON interface for input/output. |
| 423 void AddHistoryItem(Browser* browser, | 426 void AddHistoryItem(Browser* browser, |
| 424 DictionaryValue* args, | 427 base::DictionaryValue* args, |
| 425 IPC::Message* reply_message); | 428 IPC::Message* reply_message); |
| 426 | 429 |
| 427 // Invoke loading of template url model. | 430 // Invoke loading of template url model. |
| 428 // Uses the JSON interface for input/output. | 431 // Uses the JSON interface for input/output. |
| 429 void LoadSearchEngineInfo(Browser* browser, | 432 void LoadSearchEngineInfo(Browser* browser, |
| 430 DictionaryValue* args, | 433 base::DictionaryValue* args, |
| 431 IPC::Message* reply_message); | 434 IPC::Message* reply_message); |
| 432 | 435 |
| 433 // Get search engines list. | 436 // Get search engines list. |
| 434 // Assumes that the profile's template url model is loaded. | 437 // Assumes that the profile's template url model is loaded. |
| 435 // Uses the JSON interface for input/output. | 438 // Uses the JSON interface for input/output. |
| 436 void GetSearchEngineInfo(Browser* browser, | 439 void GetSearchEngineInfo(Browser* browser, |
| 437 DictionaryValue* args, | 440 base::DictionaryValue* args, |
| 438 IPC::Message* reply_message); | 441 IPC::Message* reply_message); |
| 439 | 442 |
| 440 // Add or edit search engine. | 443 // Add or edit search engine. |
| 441 // Assumes that the profile's template url model is loaded. | 444 // Assumes that the profile's template url model is loaded. |
| 442 // Uses the JSON interface for input/output. | 445 // Uses the JSON interface for input/output. |
| 443 void AddOrEditSearchEngine(Browser* browser, | 446 void AddOrEditSearchEngine(Browser* browser, |
| 444 DictionaryValue* args, | 447 base::DictionaryValue* args, |
| 445 IPC::Message* reply_message); | 448 IPC::Message* reply_message); |
| 446 | 449 |
| 447 // Perform a given action on an existing search engine. | 450 // Perform a given action on an existing search engine. |
| 448 // Assumes that the profile's template url model is loaded. | 451 // Assumes that the profile's template url model is loaded. |
| 449 // Uses the JSON interface for input/output. | 452 // Uses the JSON interface for input/output. |
| 450 void PerformActionOnSearchEngine(Browser* browser, | 453 void PerformActionOnSearchEngine(Browser* browser, |
| 451 DictionaryValue* args, | 454 base::DictionaryValue* args, |
| 452 IPC::Message* reply_message); | 455 IPC::Message* reply_message); |
| 453 | 456 |
| 454 // Get info about preferences stored in Local State. | 457 // Get info about preferences stored in Local State. |
| 455 // Uses the JSON interface for input/output. | 458 // Uses the JSON interface for input/output. |
| 456 void GetLocalStatePrefsInfo(Browser* browser, | 459 void GetLocalStatePrefsInfo(Browser* browser, |
| 457 DictionaryValue* args, | 460 base::DictionaryValue* args, |
| 458 IPC::Message* reply_message); | 461 IPC::Message* reply_message); |
| 459 | 462 |
| 460 // Set local state prefs. | 463 // Set local state prefs. |
| 461 // Uses the JSON interface for input/output. | 464 // Uses the JSON interface for input/output. |
| 462 void SetLocalStatePrefs(Browser* browser, | 465 void SetLocalStatePrefs(Browser* browser, |
| 463 DictionaryValue* args, | 466 base::DictionaryValue* args, |
| 464 IPC::Message* reply_message); | 467 IPC::Message* reply_message); |
| 465 | 468 |
| 466 // Get info about preferences. | 469 // Get info about preferences. |
| 467 // Uses the JSON interface for input/output. | 470 // Uses the JSON interface for input/output. |
| 468 void GetPrefsInfo(Browser* browser, | 471 void GetPrefsInfo(Browser* browser, |
| 469 DictionaryValue* args, | 472 base::DictionaryValue* args, |
| 470 IPC::Message* reply_message); | 473 IPC::Message* reply_message); |
| 471 | 474 |
| 472 // Set prefs. | 475 // Set prefs. |
| 473 // Uses the JSON interface for input/output. | 476 // Uses the JSON interface for input/output. |
| 474 void SetPrefs(Browser* browser, | 477 void SetPrefs(Browser* browser, |
| 475 DictionaryValue* args, | 478 base::DictionaryValue* args, |
| 476 IPC::Message* reply_message); | 479 IPC::Message* reply_message); |
| 477 | 480 |
| 478 // Return load times of initial tabs. | 481 // Return load times of initial tabs. |
| 479 // Uses the JSON interface for input/output. | 482 // Uses the JSON interface for input/output. |
| 480 // Only includes tabs from command line arguments or session restore. | 483 // Only includes tabs from command line arguments or session restore. |
| 481 // See declaration of InitialLoadObserver in automation_provider_observers.h | 484 // See declaration of InitialLoadObserver in automation_provider_observers.h |
| 482 // for example response. | 485 // for example response. |
| 483 void GetInitialLoadTimes(Browser* browser, | 486 void GetInitialLoadTimes(Browser* browser, |
| 484 DictionaryValue* args, | 487 base::DictionaryValue* args, |
| 485 IPC::Message* reply_message); | 488 IPC::Message* reply_message); |
| 486 | 489 |
| 487 // Get info about plugins. | 490 // Get info about plugins. |
| 488 // Uses the JSON interface for input/output. | 491 // Uses the JSON interface for input/output. |
| 489 void GetPluginsInfo(Browser* browser, | 492 void GetPluginsInfo(Browser* browser, |
| 490 DictionaryValue* args, | 493 base::DictionaryValue* args, |
| 491 IPC::Message* reply_message); | 494 IPC::Message* reply_message); |
| 492 | 495 |
| 493 // Enable a plugin. | 496 // Enable a plugin. |
| 494 // Uses the JSON interface for input/output. | 497 // Uses the JSON interface for input/output. |
| 495 void EnablePlugin(Browser* browser, | 498 void EnablePlugin(Browser* browser, |
| 496 DictionaryValue* args, | 499 base::DictionaryValue* args, |
| 497 IPC::Message* reply_message); | 500 IPC::Message* reply_message); |
| 498 | 501 |
| 499 // Disable a plugin. | 502 // Disable a plugin. |
| 500 // Uses the JSON interface for input/output. | 503 // Uses the JSON interface for input/output. |
| 501 void DisablePlugin(Browser* browser, | 504 void DisablePlugin(Browser* browser, |
| 502 DictionaryValue* args, | 505 base::DictionaryValue* args, |
| 503 IPC::Message* reply_message); | 506 IPC::Message* reply_message); |
| 504 | 507 |
| 505 // Get info about omnibox. | 508 // Get info about omnibox. |
| 506 // Contains data about the matches (url, content, description) | 509 // Contains data about the matches (url, content, description) |
| 507 // in the omnibox popup, the text in the omnibox. | 510 // in the omnibox popup, the text in the omnibox. |
| 508 // Uses the JSON interface for input/output. | 511 // Uses the JSON interface for input/output. |
| 509 void GetOmniboxInfo(Browser* browser, | 512 void GetOmniboxInfo(Browser* browser, |
| 510 DictionaryValue* args, | 513 base::DictionaryValue* args, |
| 511 IPC::Message* reply_message); | 514 IPC::Message* reply_message); |
| 512 | 515 |
| 513 // Set text in the omnibox. This sets focus to the omnibox. | 516 // Set text in the omnibox. This sets focus to the omnibox. |
| 514 // Uses the JSON interface for input/output. | 517 // Uses the JSON interface for input/output. |
| 515 void SetOmniboxText(Browser* browser, | 518 void SetOmniboxText(Browser* browser, |
| 516 DictionaryValue* args, | 519 base::DictionaryValue* args, |
| 517 IPC::Message* reply_message); | 520 IPC::Message* reply_message); |
| 518 | 521 |
| 519 // Move omnibox popup selection up or down. | 522 // Move omnibox popup selection up or down. |
| 520 // Uses the JSON interface for input/output. | 523 // Uses the JSON interface for input/output. |
| 521 void OmniboxMovePopupSelection(Browser* browser, | 524 void OmniboxMovePopupSelection(Browser* browser, |
| 522 DictionaryValue* args, | 525 base::DictionaryValue* args, |
| 523 IPC::Message* reply_message); | 526 IPC::Message* reply_message); |
| 524 | 527 |
| 525 // Accept the current string of text in the omnibox. | 528 // Accept the current string of text in the omnibox. |
| 526 // This is equivalent to clicking or hiting enter on a popup selection. | 529 // This is equivalent to clicking or hiting enter on a popup selection. |
| 527 // Blocks until the page loads. | 530 // Blocks until the page loads. |
| 528 // Uses the JSON interface for input/output. | 531 // Uses the JSON interface for input/output. |
| 529 void OmniboxAcceptInput(Browser* browser, | 532 void OmniboxAcceptInput(Browser* browser, |
| 530 DictionaryValue* args, | 533 base::DictionaryValue* args, |
| 531 IPC::Message* reply_message); | 534 IPC::Message* reply_message); |
| 532 | 535 |
| 533 // Generate dictionary info about instant tab. | 536 // Generate dictionary info about instant tab. |
| 534 // Uses the JSON interface for input/output. | 537 // Uses the JSON interface for input/output. |
| 535 void GetInstantInfo(Browser* browser, | 538 void GetInstantInfo(Browser* browser, |
| 536 DictionaryValue* args, | 539 base::DictionaryValue* args, |
| 537 IPC::Message* reply_message); | 540 IPC::Message* reply_message); |
| 538 | 541 |
| 539 // Save the contents of a tab into a file. | 542 // Save the contents of a tab into a file. |
| 540 // Uses the JSON interface for input/output. | 543 // Uses the JSON interface for input/output. |
| 541 void SaveTabContents(Browser* browser, | 544 void SaveTabContents(Browser* browser, |
| 542 DictionaryValue* args, | 545 base::DictionaryValue* args, |
| 543 IPC::Message* reply_message); | 546 IPC::Message* reply_message); |
| 544 | 547 |
| 545 // Import the given settings from the given browser. | 548 // Import the given settings from the given browser. |
| 546 // Uses the JSON interface for input/output. | 549 // Uses the JSON interface for input/output. |
| 547 void ImportSettings(Browser* browser, | 550 void ImportSettings(Browser* browser, |
| 548 DictionaryValue* args, | 551 base::DictionaryValue* args, |
| 549 IPC::Message* reply_message); | 552 IPC::Message* reply_message); |
| 550 | 553 |
| 551 // Add a new entry to the password store based on the password information | 554 // Add a new entry to the password store based on the password information |
| 552 // provided. This method can also be used to add a blacklisted site (which | 555 // provided. This method can also be used to add a blacklisted site (which |
| 553 // will never fill in the password). | 556 // will never fill in the password). |
| 554 // Uses the JSON interface for input/output. | 557 // Uses the JSON interface for input/output. |
| 555 void AddSavedPassword(Browser* browser, | 558 void AddSavedPassword(Browser* browser, |
| 556 DictionaryValue* args, | 559 base::DictionaryValue* args, |
| 557 IPC::Message* reply_message); | 560 IPC::Message* reply_message); |
| 558 | 561 |
| 559 // Removes the password matching the information provided. This method can | 562 // Removes the password matching the information provided. This method can |
| 560 // also be used to remove a blacklisted site. | 563 // also be used to remove a blacklisted site. |
| 561 // Uses the JSON interface for input/output. | 564 // Uses the JSON interface for input/output. |
| 562 void RemoveSavedPassword(Browser* browser, | 565 void RemoveSavedPassword(Browser* browser, |
| 563 DictionaryValue* args, | 566 base::DictionaryValue* args, |
| 564 IPC::Message* reply_message); | 567 IPC::Message* reply_message); |
| 565 | 568 |
| 566 // Return the saved username/password combinations. | 569 // Return the saved username/password combinations. |
| 567 // Uses the JSON interface for input/output. | 570 // Uses the JSON interface for input/output. |
| 568 void GetSavedPasswords(Browser* browser, | 571 void GetSavedPasswords(Browser* browser, |
| 569 DictionaryValue* args, | 572 base::DictionaryValue* args, |
| 570 IPC::Message* reply_message); | 573 IPC::Message* reply_message); |
| 571 | 574 |
| 572 // Clear the specified browsing data. This call provides similar | 575 // Clear the specified browsing data. This call provides similar |
| 573 // functionality to RemoveBrowsingData but is synchronous. | 576 // functionality to RemoveBrowsingData but is synchronous. |
| 574 // Uses the JSON interface for input/output. | 577 // Uses the JSON interface for input/output. |
| 575 void ClearBrowsingData(Browser* browser, | 578 void ClearBrowsingData(Browser* browser, |
| 576 DictionaryValue* args, | 579 base::DictionaryValue* args, |
| 577 IPC::Message* reply_message); | 580 IPC::Message* reply_message); |
| 578 | 581 |
| 579 // Get info about blocked popups in a tab. | 582 // Get info about blocked popups in a tab. |
| 580 // Uses the JSON interface for input/output. | 583 // Uses the JSON interface for input/output. |
| 581 void GetBlockedPopupsInfo(Browser* browser, | 584 void GetBlockedPopupsInfo(Browser* browser, |
| 582 DictionaryValue* args, | 585 base::DictionaryValue* args, |
| 583 IPC::Message* reply_message); | 586 IPC::Message* reply_message); |
| 584 | 587 |
| 585 // Launch a blocked popup. | 588 // Launch a blocked popup. |
| 586 // Uses the JSON interface for input/output. | 589 // Uses the JSON interface for input/output. |
| 587 void UnblockAndLaunchBlockedPopup(Browser* browser, | 590 void UnblockAndLaunchBlockedPopup(Browser* browser, |
| 588 DictionaryValue* args, | 591 base::DictionaryValue* args, |
| 589 IPC::Message* reply_message); | 592 IPC::Message* reply_message); |
| 590 | 593 |
| 591 // Get info about theme. | 594 // Get info about theme. |
| 592 // Uses the JSON interface for input/output. | 595 // Uses the JSON interface for input/output. |
| 593 void GetThemeInfo(Browser* browser, | 596 void GetThemeInfo(Browser* browser, |
| 594 DictionaryValue* args, | 597 base::DictionaryValue* args, |
| 595 IPC::Message* reply_message); | 598 IPC::Message* reply_message); |
| 596 | 599 |
| 597 // Get info about all intalled extensions. | 600 // Get info about all intalled extensions. |
| 598 // Uses the JSON interface for input/output. | 601 // Uses the JSON interface for input/output. |
| 599 void GetExtensionsInfo(Browser* browser, | 602 void GetExtensionsInfo(Browser* browser, |
| 600 DictionaryValue* args, | 603 base::DictionaryValue* args, |
| 601 IPC::Message* reply_message); | 604 IPC::Message* reply_message); |
| 602 | 605 |
| 603 // Uninstalls the extension with the given id. | 606 // Uninstalls the extension with the given id. |
| 604 // Uses the JSON interface for input/output. | 607 // Uses the JSON interface for input/output. |
| 605 void UninstallExtensionById(Browser* browser, | 608 void UninstallExtensionById(Browser* browser, |
| 606 DictionaryValue* args, | 609 base::DictionaryValue* args, |
| 607 IPC::Message* reply_message); | 610 IPC::Message* reply_message); |
| 608 | 611 |
| 609 // Set extension states: | 612 // Set extension states: |
| 610 // Enable/disable extension. | 613 // Enable/disable extension. |
| 611 // Allow/disallow extension in incognito mode. | 614 // Allow/disallow extension in incognito mode. |
| 612 // Uses the JSON interface for input/output. | 615 // Uses the JSON interface for input/output. |
| 613 void SetExtensionStateById(Browser* browser, | 616 void SetExtensionStateById(Browser* browser, |
| 614 DictionaryValue* args, | 617 base::DictionaryValue* args, |
| 615 IPC::Message* reply_message); | 618 IPC::Message* reply_message); |
| 616 | 619 |
| 617 // Responds to the Find request and returns the match count. | 620 // Responds to the Find request and returns the match count. |
| 618 void FindInPage(Browser* browser, | 621 void FindInPage(Browser* browser, |
| 619 DictionaryValue* args, | 622 base::DictionaryValue* args, |
| 620 IPC::Message* reply_message); | 623 IPC::Message* reply_message); |
| 621 | 624 |
| 622 // Returns information about translation for a given tab. Includes | 625 // Returns information about translation for a given tab. Includes |
| 623 // information about the translate bar if it is showing. | 626 // information about the translate bar if it is showing. |
| 624 void GetTranslateInfo(Browser* browser, | 627 void GetTranslateInfo(Browser* browser, |
| 625 DictionaryValue* args, | 628 base::DictionaryValue* args, |
| 626 IPC::Message* reply_message); | 629 IPC::Message* reply_message); |
| 627 | 630 |
| 628 // Takes the specified action on the translate bar. | 631 // Takes the specified action on the translate bar. |
| 629 // Uses the JSON interface for input/output. | 632 // Uses the JSON interface for input/output. |
| 630 void SelectTranslateOption(Browser* browser, | 633 void SelectTranslateOption(Browser* browser, |
| 631 DictionaryValue* args, | 634 base::DictionaryValue* args, |
| 632 IPC::Message* reply_message); | 635 IPC::Message* reply_message); |
| 633 | 636 |
| 634 // Get the profiles that are currently saved to the DB. | 637 // Get the profiles that are currently saved to the DB. |
| 635 // Uses the JSON interface for input/output. | 638 // Uses the JSON interface for input/output. |
| 636 void GetAutofillProfile(Browser* browser, | 639 void GetAutofillProfile(Browser* browser, |
| 637 DictionaryValue* args, | 640 base::DictionaryValue* args, |
| 638 IPC::Message* reply_message); | 641 IPC::Message* reply_message); |
| 639 | 642 |
| 640 // Fill in an AutofillProfile with the given profile information. | 643 // Fill in an AutofillProfile with the given profile information. |
| 641 // Uses the JSON interface for input/output. | 644 // Uses the JSON interface for input/output. |
| 642 void FillAutofillProfile(Browser* browser, | 645 void FillAutofillProfile(Browser* browser, |
| 643 DictionaryValue* args, | 646 base::DictionaryValue* args, |
| 644 IPC::Message* reply_message); | 647 IPC::Message* reply_message); |
| 645 | 648 |
| 646 // Causes the autofill popup to be displayed in an already-focused webpage | 649 // Causes the autofill popup to be displayed in an already-focused webpage |
| 647 // form field. Waits until the popup is displayed before returning. | 650 // form field. Waits until the popup is displayed before returning. |
| 648 void AutofillTriggerSuggestions(Browser* browser, | 651 void AutofillTriggerSuggestions(Browser* browser, |
| 649 DictionaryValue* args, | 652 base::DictionaryValue* args, |
| 650 IPC::Message* message); | 653 IPC::Message* message); |
| 651 | 654 |
| 652 // Highlights the previous or next autofill entry in an already-displayed | 655 // Highlights the previous or next autofill entry in an already-displayed |
| 653 // autofill popup. This is done by sending either an "up arrow" or | 656 // autofill popup. This is done by sending either an "up arrow" or |
| 654 // "down arrow" keypress, then waiting for a preview of the filled-in state | 657 // "down arrow" keypress, then waiting for a preview of the filled-in state |
| 655 // to be displayed in the webpage form before returning. Use | 658 // to be displayed in the webpage form before returning. Use |
| 656 // AutofillTriggerSuggestions() to cause the autofill popup to be displayed. | 659 // AutofillTriggerSuggestions() to cause the autofill popup to be displayed. |
| 657 void AutofillHighlightSuggestion(Browser* browser, | 660 void AutofillHighlightSuggestion(Browser* browser, |
| 658 DictionaryValue* args, | 661 base::DictionaryValue* args, |
| 659 IPC::Message* message); | 662 IPC::Message* message); |
| 660 | 663 |
| 661 // Causes a webpage form to be filled with autofill information from an | 664 // Causes a webpage form to be filled with autofill information from an |
| 662 // autofill profile that is already highlighted in an autofill popup. Use | 665 // autofill profile that is already highlighted in an autofill popup. Use |
| 663 // AutofillHighlightSuggestion() as needed to highlight the desired profile | 666 // AutofillHighlightSuggestion() as needed to highlight the desired profile |
| 664 // in the autofill popup. | 667 // in the autofill popup. |
| 665 void AutofillAcceptSelection(Browser* browser, | 668 void AutofillAcceptSelection(Browser* browser, |
| 666 DictionaryValue* args, | 669 base::DictionaryValue* args, |
| 667 IPC::Message* message); | 670 IPC::Message* message); |
| 668 | 671 |
| 669 // Signs in to sync using the given username and password. | 672 // Signs in to sync using the given username and password. |
| 670 // Uses the JSON interface for input/output. | 673 // Uses the JSON interface for input/output. |
| 671 void SignInToSync(Browser* browser, | 674 void SignInToSync(Browser* browser, |
| 672 DictionaryValue* args, | 675 base::DictionaryValue* args, |
| 673 IPC::Message* reply_message); | 676 IPC::Message* reply_message); |
| 674 | 677 |
| 675 // Returns info about sync. | 678 // Returns info about sync. |
| 676 // Uses the JSON interface for input/output. | 679 // Uses the JSON interface for input/output. |
| 677 void GetSyncInfo(Browser* browser, | 680 void GetSyncInfo(Browser* browser, |
| 678 DictionaryValue* args, | 681 base::DictionaryValue* args, |
| 679 IPC::Message* reply_message); | 682 IPC::Message* reply_message); |
| 680 | 683 |
| 681 // Waits for the ongoing sync cycle to complete. | 684 // Waits for the ongoing sync cycle to complete. |
| 682 // Uses the JSON interface for input/output. | 685 // Uses the JSON interface for input/output. |
| 683 void AwaitSyncCycleCompletion(Browser* browser, | 686 void AwaitSyncCycleCompletion(Browser* browser, |
| 684 DictionaryValue* args, | 687 base::DictionaryValue* args, |
| 685 IPC::Message* reply_message); | 688 IPC::Message* reply_message); |
| 686 | 689 |
| 687 // Waits for sync to reinitialize (for example, after a browser restart). | 690 // Waits for sync to reinitialize (for example, after a browser restart). |
| 688 // Uses the JSON interface for input/output. | 691 // Uses the JSON interface for input/output. |
| 689 void AwaitSyncRestart(Browser* browser, | 692 void AwaitSyncRestart(Browser* browser, |
| 690 DictionaryValue* args, | 693 base::DictionaryValue* args, |
| 691 IPC::Message* reply_message); | 694 IPC::Message* reply_message); |
| 692 | 695 |
| 693 // Enables sync for one or more sync datatypes. | 696 // Enables sync for one or more sync datatypes. |
| 694 // Uses the JSON interface for input/output. | 697 // Uses the JSON interface for input/output. |
| 695 void EnableSyncForDatatypes(Browser* browser, | 698 void EnableSyncForDatatypes(Browser* browser, |
| 696 DictionaryValue* args, | 699 base::DictionaryValue* args, |
| 697 IPC::Message* reply_message); | 700 IPC::Message* reply_message); |
| 698 | 701 |
| 699 // Disables sync for one or more sync datatypes. | 702 // Disables sync for one or more sync datatypes. |
| 700 // Uses the JSON interface for input/output. | 703 // Uses the JSON interface for input/output. |
| 701 void DisableSyncForDatatypes(Browser* browser, | 704 void DisableSyncForDatatypes(Browser* browser, |
| 702 DictionaryValue* args, | 705 base::DictionaryValue* args, |
| 703 IPC::Message* reply_message); | 706 IPC::Message* reply_message); |
| 704 | 707 |
| 705 // Translate DictionaryValues of autofill profiles and credit cards to the | 708 // Translate DictionaryValues of autofill profiles and credit cards to the |
| 706 // data structure used in the browser. | 709 // data structure used in the browser. |
| 707 // Args: | 710 // Args: |
| 708 // profiles/cards: the ListValue of profiles/credit cards to translate. | 711 // profiles/cards: the ListValue of profiles/credit cards to translate. |
| 709 // error_message: a pointer to the return string in case of error. | 712 // error_message: a pointer to the return string in case of error. |
| 710 static std::vector<AutofillProfile> GetAutofillProfilesFromList( | 713 static std::vector<AutofillProfile> GetAutofillProfilesFromList( |
| 711 const ListValue& profiles, std::string* error_message); | 714 const base::ListValue& profiles, std::string* error_message); |
| 712 static std::vector<CreditCard> GetCreditCardsFromList( | 715 static std::vector<CreditCard> GetCreditCardsFromList( |
| 713 const ListValue& cards, std::string* error_message); | 716 const base::ListValue& cards, std::string* error_message); |
| 714 | 717 |
| 715 // The opposite of the above: translates from the internal data structure | 718 // The opposite of the above: translates from the internal data structure |
| 716 // for profiles and credit cards to a ListValue of DictionaryValues. The | 719 // for profiles and credit cards to a ListValue of DictionaryValues. The |
| 717 // caller owns the returned object. | 720 // caller owns the returned object. |
| 718 static ListValue* GetListFromAutofillProfiles( | 721 static base::ListValue* GetListFromAutofillProfiles( |
| 719 const std::vector<AutofillProfile*>& autofill_profiles); | 722 const std::vector<AutofillProfile*>& autofill_profiles); |
| 720 static ListValue* GetListFromCreditCards( | 723 static base::ListValue* GetListFromCreditCards( |
| 721 const std::vector<CreditCard*>& credit_cards); | 724 const std::vector<CreditCard*>& credit_cards); |
| 722 | 725 |
| 723 // Return the map from the internal data representation to the string value | 726 // Return the map from the internal data representation to the string value |
| 724 // of auto fill fields and credit card fields. | 727 // of auto fill fields and credit card fields. |
| 725 static std::map<AutofillFieldType, std::string> | 728 static std::map<AutofillFieldType, std::string> |
| 726 GetAutofillFieldToStringMap(); | 729 GetAutofillFieldToStringMap(); |
| 727 static std::map<AutofillFieldType, std::string> | 730 static std::map<AutofillFieldType, std::string> |
| 728 GetCreditCardFieldToStringMap(); | 731 GetCreditCardFieldToStringMap(); |
| 729 | 732 |
| 730 // Get a list of active HTML5 notifications. | 733 // Get a list of active HTML5 notifications. |
| 731 // Uses the JSON interface for input/output. | 734 // Uses the JSON interface for input/output. |
| 732 void GetActiveNotifications(Browser* browser, | 735 void GetActiveNotifications(Browser* browser, |
| 733 DictionaryValue* args, | 736 base::DictionaryValue* args, |
| 734 IPC::Message* reply_message); | 737 IPC::Message* reply_message); |
| 735 | 738 |
| 736 // Close an active HTML5 notification. | 739 // Close an active HTML5 notification. |
| 737 // Uses the JSON interface for input/output. | 740 // Uses the JSON interface for input/output. |
| 738 void CloseNotification(Browser* browser, | 741 void CloseNotification(Browser* browser, |
| 739 DictionaryValue* args, | 742 base::DictionaryValue* args, |
| 740 IPC::Message* reply_message); | 743 IPC::Message* reply_message); |
| 741 | 744 |
| 742 // Waits for the number of active HTML5 notifications to reach a given count. | 745 // Waits for the number of active HTML5 notifications to reach a given count. |
| 743 // Uses the JSON interface for input/output. | 746 // Uses the JSON interface for input/output. |
| 744 void WaitForNotificationCount(Browser* browser, | 747 void WaitForNotificationCount(Browser* browser, |
| 745 DictionaryValue* args, | 748 base::DictionaryValue* args, |
| 746 IPC::Message* reply_message); | 749 IPC::Message* reply_message); |
| 747 | 750 |
| 748 // Gets info about the elements in the NTP. | 751 // Gets info about the elements in the NTP. |
| 749 // Uses the JSON interface for input/output. | 752 // Uses the JSON interface for input/output. |
| 750 void GetNTPInfo(Browser* browser, | 753 void GetNTPInfo(Browser* browser, |
| 751 DictionaryValue* args, | 754 base::DictionaryValue* args, |
| 752 IPC::Message* reply_message); | 755 IPC::Message* reply_message); |
| 753 | 756 |
| 754 // Moves a thumbnail in the NTP's Most Visited sites section to a different | 757 // Moves a thumbnail in the NTP's Most Visited sites section to a different |
| 755 // index. | 758 // index. |
| 756 // Uses the JSON interface for input/output. | 759 // Uses the JSON interface for input/output. |
| 757 void MoveNTPMostVisitedThumbnail(Browser* browser, | 760 void MoveNTPMostVisitedThumbnail(Browser* browser, |
| 758 DictionaryValue* args, | 761 base::DictionaryValue* args, |
| 759 IPC::Message* reply_message); | 762 IPC::Message* reply_message); |
| 760 | 763 |
| 761 // Removes a thumbnail from the NTP's Most Visited sites section. | 764 // Removes a thumbnail from the NTP's Most Visited sites section. |
| 762 // Uses the JSON interface for input/output. | 765 // Uses the JSON interface for input/output. |
| 763 void RemoveNTPMostVisitedThumbnail(Browser* browser, | 766 void RemoveNTPMostVisitedThumbnail(Browser* browser, |
| 764 DictionaryValue* args, | 767 base::DictionaryValue* args, |
| 765 IPC::Message* reply_message); | 768 IPC::Message* reply_message); |
| 766 | 769 |
| 767 // Unpins a thumbnail in the NTP's Most Visited sites section. | 770 // Unpins a thumbnail in the NTP's Most Visited sites section. |
| 768 // Uses the JSON interface for input/output. | 771 // Uses the JSON interface for input/output. |
| 769 void UnpinNTPMostVisitedThumbnail(Browser* browser, | 772 void UnpinNTPMostVisitedThumbnail(Browser* browser, |
| 770 DictionaryValue* args, | 773 base::DictionaryValue* args, |
| 771 IPC::Message* reply_message); | 774 IPC::Message* reply_message); |
| 772 | 775 |
| 773 // Restores all thumbnails that have been removed (i.e., blacklisted) from the | 776 // Restores all thumbnails that have been removed (i.e., blacklisted) from the |
| 774 // NTP's Most Visited sites section. | 777 // NTP's Most Visited sites section. |
| 775 // Uses the JSON interface for input/output. | 778 // Uses the JSON interface for input/output. |
| 776 void RestoreAllNTPMostVisitedThumbnails(Browser* browser, | 779 void RestoreAllNTPMostVisitedThumbnails(Browser* browser, |
| 777 DictionaryValue* args, | 780 base::DictionaryValue* args, |
| 778 IPC::Message* reply_message); | 781 IPC::Message* reply_message); |
| 779 | 782 |
| 780 // Kills the given renderer process and returns after the associated | 783 // Kills the given renderer process and returns after the associated |
| 781 // RenderProcessHost receives notification of its closing. | 784 // RenderProcessHost receives notification of its closing. |
| 782 void KillRendererProcess(Browser* browser, | 785 void KillRendererProcess(Browser* browser, |
| 783 DictionaryValue* args, | 786 base::DictionaryValue* args, |
| 784 IPC::Message* reply_message); | 787 IPC::Message* reply_message); |
| 785 | 788 |
| 786 // Populates the fields of the event parameter with what is found in the | 789 // Populates the fields of the event parameter with what is found in the |
| 787 // args parameter. Upon failure, returns false and puts the error message in | 790 // args parameter. Upon failure, returns false and puts the error message in |
| 788 // the error parameter, otherwise returns true. | 791 // the error parameter, otherwise returns true. |
| 789 bool BuildWebKeyEventFromArgs(DictionaryValue* args, | 792 bool BuildWebKeyEventFromArgs(base::DictionaryValue* args, |
| 790 std::string* error, | 793 std::string* error, |
| 791 NativeWebKeyboardEvent* event); | 794 NativeWebKeyboardEvent* event); |
| 792 | 795 |
| 793 // Populates the fields of the event parameter with default data, except for | 796 // Populates the fields of the event parameter with default data, except for |
| 794 // the specified key type and key code. | 797 // the specified key type and key code. |
| 795 void BuildSimpleWebKeyEvent(WebKit::WebInputEvent::Type type, | 798 void BuildSimpleWebKeyEvent(WebKit::WebInputEvent::Type type, |
| 796 int windows_key_code, | 799 int windows_key_code, |
| 797 NativeWebKeyboardEvent* event); | 800 NativeWebKeyboardEvent* event); |
| 798 | 801 |
| 799 // Sends a key press event using the given key code to the specified tab. | 802 // Sends a key press event using the given key code to the specified tab. |
| 800 // A key press is a combination of a "key down" event and a "key up" event. | 803 // A key press is a combination of a "key down" event and a "key up" event. |
| 801 // This function does not wait before returning. | 804 // This function does not wait before returning. |
| 802 void SendWebKeyPressEventAsync(int key_code, | 805 void SendWebKeyPressEventAsync(int key_code, |
| 803 TabContents* tab_contents); | 806 TabContents* tab_contents); |
| 804 | 807 |
| 805 // Determines whether each relevant section of the NTP is in thumbnail mode. | 808 // Determines whether each relevant section of the NTP is in thumbnail mode. |
| 806 void GetNTPThumbnailMode(Browser* browser, | 809 void GetNTPThumbnailMode(Browser* browser, |
| 807 DictionaryValue* args, | 810 base::DictionaryValue* args, |
| 808 IPC::Message* reply_message); | 811 IPC::Message* reply_message); |
| 809 | 812 |
| 810 // Puts or removes the specified section of the NTP into/from thumbnail mode. | 813 // Puts or removes the specified section of the NTP into/from thumbnail mode. |
| 811 // If the section is put into thumbnail mode, all other relevant sections are | 814 // If the section is put into thumbnail mode, all other relevant sections are |
| 812 // removed from thumbnail mode. | 815 // removed from thumbnail mode. |
| 813 void SetNTPThumbnailMode(Browser* browser, | 816 void SetNTPThumbnailMode(Browser* browser, |
| 814 DictionaryValue* args, | 817 base::DictionaryValue* args, |
| 815 IPC::Message* reply_message); | 818 IPC::Message* reply_message); |
| 816 | 819 |
| 817 // Determines whether each relevant section of the NTP is in menu mode. | 820 // Determines whether each relevant section of the NTP is in menu mode. |
| 818 void GetNTPMenuMode(Browser* browser, | 821 void GetNTPMenuMode(Browser* browser, |
| 819 DictionaryValue* args, | 822 base::DictionaryValue* args, |
| 820 IPC::Message* reply_message); | 823 IPC::Message* reply_message); |
| 821 | 824 |
| 822 // Puts or removes the specified section of the NTP into/from menu mode. | 825 // Puts or removes the specified section of the NTP into/from menu mode. |
| 823 void SetNTPMenuMode(Browser* browser, | 826 void SetNTPMenuMode(Browser* browser, |
| 824 DictionaryValue* args, | 827 base::DictionaryValue* args, |
| 825 IPC::Message* reply_message); | 828 IPC::Message* reply_message); |
| 826 | 829 |
| 827 // Launches the specified app from the currently-selected tab. | 830 // Launches the specified app from the currently-selected tab. |
| 828 void LaunchApp(Browser* browser, | 831 void LaunchApp(Browser* browser, |
| 829 DictionaryValue* args, | 832 base::DictionaryValue* args, |
| 830 IPC::Message* reply_message); | 833 IPC::Message* reply_message); |
| 831 | 834 |
| 832 // Sets the launch type for the specified app. | 835 // Sets the launch type for the specified app. |
| 833 void SetAppLaunchType(Browser* browser, | 836 void SetAppLaunchType(Browser* browser, |
| 834 DictionaryValue* args, | 837 base::DictionaryValue* args, |
| 835 IPC::Message* reply_message); | 838 IPC::Message* reply_message); |
| 836 | 839 |
| 837 // Waits for all tabs to stop loading. | 840 // Waits for all tabs to stop loading. |
| 838 void WaitForAllTabsToStopLoading(DictionaryValue* args, | 841 void WaitForAllTabsToStopLoading(base::DictionaryValue* args, |
| 839 IPC::Message* reply_message); | 842 IPC::Message* reply_message); |
| 840 | 843 |
| 841 // Gets the browser and tab index of the given tab. Uses the JSON interface. | 844 // Gets the browser and tab index of the given tab. Uses the JSON interface. |
| 842 // Either "tab_id" or "tab_handle" must be specified, but not both. "tab_id" | 845 // Either "tab_id" or "tab_handle" must be specified, but not both. "tab_id" |
| 843 // refers to the ID from the |NavigationController|, while "tab_handle" is | 846 // refers to the ID from the |NavigationController|, while "tab_handle" is |
| 844 // the handle number assigned by the automation system. | 847 // the handle number assigned by the automation system. |
| 845 // Example: | 848 // Example: |
| 846 // input: { "tab_id": 1, // optional | 849 // input: { "tab_id": 1, // optional |
| 847 // "tab_handle": 3 // optional | 850 // "tab_handle": 3 // optional |
| 848 // } | 851 // } |
| 849 // output: { "windex": 1, "tab_index": 5 } | 852 // output: { "windex": 1, "tab_index": 5 } |
| 850 void GetIndicesFromTab(DictionaryValue* args, IPC::Message* reply_message); | 853 void GetIndicesFromTab(base::DictionaryValue* args, |
| 854 IPC::Message* reply_message); |
| 851 | 855 |
| 852 // Navigates to the given URL. Uses the JSON interface. | 856 // Navigates to the given URL. Uses the JSON interface. |
| 853 // Example: | 857 // Example: |
| 854 // input: { "windex": 1, | 858 // input: { "windex": 1, |
| 855 // "tab_index": 3, | 859 // "tab_index": 3, |
| 856 // "url": "http://www.google.com", | 860 // "url": "http://www.google.com", |
| 857 // "navigation_count": 1 // number of navigations to wait for | 861 // "navigation_count": 1 // number of navigations to wait for |
| 858 // } | 862 // } |
| 859 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } | 863 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } |
| 860 void NavigateToURL(DictionaryValue* args, IPC::Message* reply_message); | 864 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message); |
| 861 | 865 |
| 862 // Executes javascript in the specified frame. Uses the JSON interface. | 866 // Executes javascript in the specified frame. Uses the JSON interface. |
| 863 // Waits for a result from the |DOMAutomationController|. The javascript | 867 // Waits for a result from the |DOMAutomationController|. The javascript |
| 864 // must send a string. | 868 // must send a string. |
| 865 // Example: | 869 // Example: |
| 866 // input: { "windex": 1, | 870 // input: { "windex": 1, |
| 867 // "tab_index": 1, | 871 // "tab_index": 1, |
| 868 // "frame_xpath": "//frames[1]", | 872 // "frame_xpath": "//frames[1]", |
| 869 // "javascript": | 873 // "javascript": |
| 870 // "window.domAutomationController.send(window.name)", | 874 // "window.domAutomationController.send(window.name)", |
| 871 // } | 875 // } |
| 872 // output: { "result": "My Window Name" } | 876 // output: { "result": "My Window Name" } |
| 873 // This and some following methods have a suffix of JSON to distingush them | 877 // This and some following methods have a suffix of JSON to distingush them |
| 874 // from already existing methods which perform the same function, but use | 878 // from already existing methods which perform the same function, but use |
| 875 // custom IPC messages instead of the JSON IPC message. These functions will | 879 // custom IPC messages instead of the JSON IPC message. These functions will |
| 876 // eventually be replaced with the JSON ones and the JSON suffix will be | 880 // eventually be replaced with the JSON ones and the JSON suffix will be |
| 877 // dropped. | 881 // dropped. |
| 878 // TODO(kkania): Replace the non-JSON counterparts and drop the JSON suffix. | 882 // TODO(kkania): Replace the non-JSON counterparts and drop the JSON suffix. |
| 879 void ExecuteJavascriptJSON( | 883 void ExecuteJavascriptJSON( |
| 880 DictionaryValue* args, IPC::Message* reply_message); | 884 base::DictionaryValue* args, IPC::Message* reply_message); |
| 881 | 885 |
| 882 // Goes forward in the specified tab. Uses the JSON interface. | 886 // Goes forward in the specified tab. Uses the JSON interface. |
| 883 // Example: | 887 // Example: |
| 884 // input: { "windex": 1, "tab_index": 1 } | 888 // input: { "windex": 1, "tab_index": 1 } |
| 885 // output: { "did_go_forward": true, // optional | 889 // output: { "did_go_forward": true, // optional |
| 886 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional | 890 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional |
| 887 // } | 891 // } |
| 888 void GoForward(DictionaryValue* args, IPC::Message* reply_message); | 892 void GoForward(base::DictionaryValue* args, IPC::Message* reply_message); |
| 889 | 893 |
| 890 // Goes back in the specified tab. Uses the JSON interface. | 894 // Goes back in the specified tab. Uses the JSON interface. |
| 891 // Example: | 895 // Example: |
| 892 // input: { "windex": 1, "tab_index": 1 } | 896 // input: { "windex": 1, "tab_index": 1 } |
| 893 // output: { "did_go_back": true, // optional | 897 // output: { "did_go_back": true, // optional |
| 894 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional | 898 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional |
| 895 // } | 899 // } |
| 896 void GoBack(DictionaryValue* args, IPC::Message* reply_message); | 900 void GoBack(base::DictionaryValue* args, IPC::Message* reply_message); |
| 897 | 901 |
| 898 // Reload the specified tab. Uses the JSON interface. | 902 // Reload the specified tab. Uses the JSON interface. |
| 899 // Example: | 903 // Example: |
| 900 // input: { "windex": 1, "tab_index": 1 } | 904 // input: { "windex": 1, "tab_index": 1 } |
| 901 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional } | 905 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional } |
| 902 void ReloadJSON(DictionaryValue* args, IPC::Message* reply_message); | 906 void ReloadJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
| 903 | 907 |
| 904 // Get the current url of the specified tab. Uses the JSON interface. | 908 // Get the current url of the specified tab. Uses the JSON interface. |
| 905 // Example: | 909 // Example: |
| 906 // input: { "windex": 1, "tab_index": 1 } | 910 // input: { "windex": 1, "tab_index": 1 } |
| 907 // output: { "url": "http://www.google.com" } | 911 // output: { "url": "http://www.google.com" } |
| 908 void GetTabURLJSON(DictionaryValue* args, IPC::Message* reply_message); | 912 void GetTabURLJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
| 909 | 913 |
| 910 // Get the current url of the specified tab. Uses the JSON interface. | 914 // Get the current url of the specified tab. Uses the JSON interface. |
| 911 // Example: | 915 // Example: |
| 912 // input: { "windex": 1, "tab_index": 1 } | 916 // input: { "windex": 1, "tab_index": 1 } |
| 913 // output: { "title": "Google" } | 917 // output: { "title": "Google" } |
| 914 void GetTabTitleJSON(DictionaryValue* args, IPC::Message* reply_message); | 918 void GetTabTitleJSON(base::DictionaryValue* args, |
| 919 IPC::Message* reply_message); |
| 915 | 920 |
| 916 // Captures the entire page of the the specified tab, including the | 921 // Captures the entire page of the the specified tab, including the |
| 917 // non-visible portions of the page, and saves the PNG to a file. | 922 // non-visible portions of the page, and saves the PNG to a file. |
| 918 // Example: | 923 // Example: |
| 919 // input: { "windex": 1, "tab_index": 1, "path":"/tmp/foo.png"} | 924 // input: { "windex": 1, "tab_index": 1, "path":"/tmp/foo.png"} |
| 920 // output: none | 925 // output: none |
| 921 void CaptureEntirePageJSON( | 926 void CaptureEntirePageJSON( |
| 922 DictionaryValue* args, IPC::Message* reply_message); | 927 base::DictionaryValue* args, IPC::Message* reply_message); |
| 923 | 928 |
| 924 // Gets the cookies for the given URL. Uses the JSON interface. | 929 // Gets the cookies for the given URL. Uses the JSON interface. |
| 925 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, | 930 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, |
| 926 // the cookie is valid for the duration of the browser session. | 931 // the cookie is valid for the duration of the browser session. |
| 927 // Example: | 932 // Example: |
| 928 // input: { "url": "http://www.google.com" } | 933 // input: { "url": "http://www.google.com" } |
| 929 // output: { "cookies": [ | 934 // output: { "cookies": [ |
| 930 // { | 935 // { |
| 931 // "name": "PREF", | 936 // "name": "PREF", |
| 932 // "value": "123101", | 937 // "value": "123101", |
| 933 // "path": "/", | 938 // "path": "/", |
| 934 // "domain": "www.google.com", | 939 // "domain": "www.google.com", |
| 935 // "secure": false, | 940 // "secure": false, |
| 936 // "expiry": 1401982012 | 941 // "expiry": 1401982012 |
| 937 // } | 942 // } |
| 938 // ] | 943 // ] |
| 939 // } | 944 // } |
| 940 void GetCookiesJSON(DictionaryValue* args, IPC::Message* reply_message); | 945 void GetCookiesJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
| 941 | 946 |
| 942 // Deletes the cookie with the given name for the URL. Uses the JSON | 947 // Deletes the cookie with the given name for the URL. Uses the JSON |
| 943 // interface. | 948 // interface. |
| 944 // Example: | 949 // Example: |
| 945 // input: { | 950 // input: { |
| 946 // "url": "http://www.google.com", | 951 // "url": "http://www.google.com", |
| 947 // "name": "my_cookie" | 952 // "name": "my_cookie" |
| 948 // } | 953 // } |
| 949 // output: none | 954 // output: none |
| 950 void DeleteCookieJSON(DictionaryValue* args, IPC::Message* reply_message); | 955 void DeleteCookieJSON(base::DictionaryValue* args, |
| 956 IPC::Message* reply_message); |
| 951 | 957 |
| 952 // Sets a cookie for the given URL. Uses the JSON interface. | 958 // Sets a cookie for the given URL. Uses the JSON interface. |
| 953 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, | 959 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, |
| 954 // the cookie will be valid for the duration of the browser session. | 960 // the cookie will be valid for the duration of the browser session. |
| 955 // "domain" refers to the applicable domain for the cookie. Valid domain | 961 // "domain" refers to the applicable domain for the cookie. Valid domain |
| 956 // choices for the site "http://www.google.com" and resulting cookie | 962 // choices for the site "http://www.google.com" and resulting cookie |
| 957 // applicability: | 963 // applicability: |
| 958 // [.]www.google.com - applicable on www.google.com and its subdomains | 964 // [.]www.google.com - applicable on www.google.com and its subdomains |
| 959 // [.]google.com - applicable on google.com and its subdomains | 965 // [.]google.com - applicable on google.com and its subdomains |
| 960 // <none> - applicable only on www.google.com | 966 // <none> - applicable only on www.google.com |
| 961 // | 967 // |
| 962 // Example: | 968 // Example: |
| 963 // input: { "url": "http://www.google.com", | 969 // input: { "url": "http://www.google.com", |
| 964 // "cookie": { | 970 // "cookie": { |
| 965 // "name": "PREF", | 971 // "name": "PREF", |
| 966 // "value": "123101", | 972 // "value": "123101", |
| 967 // "path": "/", // optional | 973 // "path": "/", // optional |
| 968 // "domain": ".www.google.com", // optional | 974 // "domain": ".www.google.com", // optional |
| 969 // "secure": false, // optional | 975 // "secure": false, // optional |
| 970 // "expiry": 1401982012 // optional | 976 // "expiry": 1401982012 // optional |
| 971 // } | 977 // } |
| 972 // } | 978 // } |
| 973 // output: none | 979 // output: none |
| 974 void SetCookieJSON(DictionaryValue* args, IPC::Message* reply_message); | 980 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
| 975 | 981 |
| 976 // Gets the ID for every open tab. This ID is unique per session. | 982 // Gets the ID for every open tab. This ID is unique per session. |
| 977 // Example: | 983 // Example: |
| 978 // input: none | 984 // input: none |
| 979 // output: { "ids": [4124, 213, 1] } | 985 // output: { "ids": [4124, 213, 1] } |
| 980 void GetTabIds(DictionaryValue* args, IPC::Message* reply_message); | 986 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); |
| 981 | 987 |
| 982 // Checks if the given tab ID refers to an open tab. | 988 // Checks if the given tab ID refers to an open tab. |
| 983 // Example: | 989 // Example: |
| 984 // input: { "id": 41 } | 990 // input: { "id": 41 } |
| 985 // output: { "is_valid": false } | 991 // output: { "is_valid": false } |
| 986 void IsTabIdValid(DictionaryValue* args, IPC::Message* reply_message); | 992 void IsTabIdValid(base::DictionaryValue* args, IPC::Message* reply_message); |
| 987 | 993 |
| 988 // Closes the specified tab. | 994 // Closes the specified tab. |
| 989 // Example: | 995 // Example: |
| 990 // input: { "windex": 1, "tab_index": 1 } | 996 // input: { "windex": 1, "tab_index": 1 } |
| 991 // output: none | 997 // output: none |
| 992 void CloseTabJSON(DictionaryValue* args, IPC::Message* reply_message); | 998 void CloseTabJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
| 993 | 999 |
| 994 // Sends the WebKit events for a mouse click at a given coordinate. | 1000 // Sends the WebKit events for a mouse click at a given coordinate. |
| 995 // Example: | 1001 // Example: |
| 996 // input: { "windex": 1, | 1002 // input: { "windex": 1, |
| 997 // "tab_index": 1, | 1003 // "tab_index": 1, |
| 998 // "button": automation::kLeftButton, | 1004 // "button": automation::kLeftButton, |
| 999 // "x": 100, | 1005 // "x": 100, |
| 1000 // "y": 100 | 1006 // "y": 100 |
| 1001 // } | 1007 // } |
| 1002 // output: none | 1008 // output: none |
| 1003 void WebkitMouseClick(DictionaryValue* args, | 1009 void WebkitMouseClick(base::DictionaryValue* args, |
| 1004 IPC::Message* message); | 1010 IPC::Message* message); |
| 1005 | 1011 |
| 1006 // Sends the WebKit event for a mouse move to a given coordinate. | 1012 // Sends the WebKit event for a mouse move to a given coordinate. |
| 1007 // Example: | 1013 // Example: |
| 1008 // input: { "windex": 1, | 1014 // input: { "windex": 1, |
| 1009 // "tab_index": 1, | 1015 // "tab_index": 1, |
| 1010 // "x": 100, | 1016 // "x": 100, |
| 1011 // "y": 100 | 1017 // "y": 100 |
| 1012 // } | 1018 // } |
| 1013 // output: none | 1019 // output: none |
| 1014 void WebkitMouseMove(DictionaryValue* args, | 1020 void WebkitMouseMove(base::DictionaryValue* args, |
| 1015 IPC::Message* message); | 1021 IPC::Message* message); |
| 1016 | 1022 |
| 1017 // Sends the WebKit events for a mouse drag between two coordinates. | 1023 // Sends the WebKit events for a mouse drag between two coordinates. |
| 1018 // Example: | 1024 // Example: |
| 1019 // input: { "windex": 1, | 1025 // input: { "windex": 1, |
| 1020 // "tab_index": 1, | 1026 // "tab_index": 1, |
| 1021 // "start_x": 100, | 1027 // "start_x": 100, |
| 1022 // "start_y": 100, | 1028 // "start_y": 100, |
| 1023 // "end_x": 100, | 1029 // "end_x": 100, |
| 1024 // "end_y": 100 | 1030 // "end_y": 100 |
| 1025 // } | 1031 // } |
| 1026 // output: none | 1032 // output: none |
| 1027 void WebkitMouseDrag(DictionaryValue* args, | 1033 void WebkitMouseDrag(base::DictionaryValue* args, |
| 1028 IPC::Message* message); | 1034 IPC::Message* message); |
| 1029 | 1035 |
| 1030 // Sends the WebKit events for a mouse button down at a given coordinate. | 1036 // Sends the WebKit events for a mouse button down at a given coordinate. |
| 1031 // Example: | 1037 // Example: |
| 1032 // input: { "windex": 1, | 1038 // input: { "windex": 1, |
| 1033 // "tab_index": 1, | 1039 // "tab_index": 1, |
| 1034 // "x": 100, | 1040 // "x": 100, |
| 1035 // "y": 100 | 1041 // "y": 100 |
| 1036 // } | 1042 // } |
| 1037 // output: none | 1043 // output: none |
| 1038 void WebkitMouseButtonDown(DictionaryValue* args, | 1044 void WebkitMouseButtonDown(base::DictionaryValue* args, |
| 1039 IPC::Message* message); | 1045 IPC::Message* message); |
| 1040 | 1046 |
| 1041 // Sends the WebKit events for a mouse button up at a given coordinate. | 1047 // Sends the WebKit events for a mouse button up at a given coordinate. |
| 1042 // Example: | 1048 // Example: |
| 1043 // input: { "windex": 1, | 1049 // input: { "windex": 1, |
| 1044 // "tab_index": 1, | 1050 // "tab_index": 1, |
| 1045 // "x": 100, | 1051 // "x": 100, |
| 1046 // "y": 100 | 1052 // "y": 100 |
| 1047 // } | 1053 // } |
| 1048 // output: none | 1054 // output: none |
| 1049 void WebkitMouseButtonUp(DictionaryValue* args, | 1055 void WebkitMouseButtonUp(base::DictionaryValue* args, |
| 1050 IPC::Message* message); | 1056 IPC::Message* message); |
| 1051 | 1057 |
| 1052 // Sends the WebKit events for a mouse double click at a given coordinate. | 1058 // Sends the WebKit events for a mouse double click at a given coordinate. |
| 1053 // Example: | 1059 // Example: |
| 1054 // input: { "windex": 1, | 1060 // input: { "windex": 1, |
| 1055 // "tab_index": 1, | 1061 // "tab_index": 1, |
| 1056 // "x": 100, | 1062 // "x": 100, |
| 1057 // "y": 100 | 1063 // "y": 100 |
| 1058 // } | 1064 // } |
| 1059 // output: none | 1065 // output: none |
| 1060 void WebkitMouseDoubleClick(DictionaryValue* args, | 1066 void WebkitMouseDoubleClick(base::DictionaryValue* args, |
| 1061 IPC::Message* message); | 1067 IPC::Message* message); |
| 1062 | 1068 |
| 1063 // Drag and drop file paths at a given coordinate. | 1069 // Drag and drop file paths at a given coordinate. |
| 1064 // Example: | 1070 // Example: |
| 1065 // input: { "windex": 1, | 1071 // input: { "windex": 1, |
| 1066 // "tab_index": 1, | 1072 // "tab_index": 1, |
| 1067 // "x": 100, | 1073 // "x": 100, |
| 1068 // "y": 100, | 1074 // "y": 100, |
| 1069 // "paths": [ | 1075 // "paths": [ |
| 1070 // "/tmp/file.txt" | 1076 // "/tmp/file.txt" |
| 1071 // ], | 1077 // ], |
| 1072 // } | 1078 // } |
| 1073 // output: none | 1079 // output: none |
| 1074 void DragAndDropFilePaths(DictionaryValue* args, | 1080 void DragAndDropFilePaths(base::DictionaryValue* args, |
| 1075 IPC::Message* message); | 1081 IPC::Message* message); |
| 1076 | 1082 |
| 1077 // Sends the WebKit key event with the specified properties. | 1083 // Sends the WebKit key event with the specified properties. |
| 1078 // Example: | 1084 // Example: |
| 1079 // input: { "windex": 1, | 1085 // input: { "windex": 1, |
| 1080 // "tab_index": 1, | 1086 // "tab_index": 1, |
| 1081 // "type": automation::kRawKeyDownType, | 1087 // "type": automation::kRawKeyDownType, |
| 1082 // "nativeKeyCode": ui::VKEY_X, | 1088 // "nativeKeyCode": ui::VKEY_X, |
| 1083 // "windowsKeyCode": ui::VKEY_X, | 1089 // "windowsKeyCode": ui::VKEY_X, |
| 1084 // "unmodifiedText": "x", | 1090 // "unmodifiedText": "x", |
| 1085 // "text": "X", | 1091 // "text": "X", |
| 1086 // "modifiers": automation::kShiftKeyMask, | 1092 // "modifiers": automation::kShiftKeyMask, |
| 1087 // "isSystemKey": false | 1093 // "isSystemKey": false |
| 1088 // } | 1094 // } |
| 1089 // output: none | 1095 // output: none |
| 1090 void SendWebkitKeyEvent(DictionaryValue* args, | 1096 void SendWebkitKeyEvent(base::DictionaryValue* args, |
| 1091 IPC::Message* message); | 1097 IPC::Message* message); |
| 1092 | 1098 |
| 1093 // Sends the key event from the OS level to the browser window, | 1099 // Sends the key event from the OS level to the browser window, |
| 1094 // allowing it to be preprocessed by some external application (ie. IME). | 1100 // allowing it to be preprocessed by some external application (ie. IME). |
| 1095 // Will switch to the tab specified by tab_index before sending the event. | 1101 // Will switch to the tab specified by tab_index before sending the event. |
| 1096 // Example: | 1102 // Example: |
| 1097 // input: { "windex": 1, | 1103 // input: { "windex": 1, |
| 1098 // "tab_index": 1, | 1104 // "tab_index": 1, |
| 1099 // "keyCode": ui::VKEY_X, | 1105 // "keyCode": ui::VKEY_X, |
| 1100 // "modifiers": automation::kShiftKeyMask, | 1106 // "modifiers": automation::kShiftKeyMask, |
| 1101 // } | 1107 // } |
| 1102 // output: none | 1108 // output: none |
| 1103 void SendOSLevelKeyEventToTab(DictionaryValue* args, | 1109 void SendOSLevelKeyEventToTab(base::DictionaryValue* args, |
| 1104 IPC::Message* message); | 1110 IPC::Message* message); |
| 1105 | 1111 |
| 1106 // Method used as a Task that sends a success AutomationJSONReply. | 1112 // Method used as a Task that sends a success AutomationJSONReply. |
| 1107 void SendSuccessReply(IPC::Message* reply_message); | 1113 void SendSuccessReply(IPC::Message* reply_message); |
| 1108 | 1114 |
| 1109 // Gets the active JavaScript modal dialog's message. | 1115 // Gets the active JavaScript modal dialog's message. |
| 1110 // Example: | 1116 // Example: |
| 1111 // input: none | 1117 // input: none |
| 1112 // output: { "message": "This is an alert!" } | 1118 // output: { "message": "This is an alert!" } |
| 1113 void GetAppModalDialogMessage( | 1119 void GetAppModalDialogMessage( |
| 1114 DictionaryValue* args, IPC::Message* reply_message); | 1120 base::DictionaryValue* args, IPC::Message* reply_message); |
| 1115 | 1121 |
| 1116 // Accepts or dismisses the active JavaScript modal dialog. If optional | 1122 // Accepts or dismisses the active JavaScript modal dialog. If optional |
| 1117 // prompt text is given, it will be used as the result of the prompt dialog. | 1123 // prompt text is given, it will be used as the result of the prompt dialog. |
| 1118 // Example: | 1124 // Example: |
| 1119 // input: { "accept": true, | 1125 // input: { "accept": true, |
| 1120 // "prompt_text": "hello" // optional | 1126 // "prompt_text": "hello" // optional |
| 1121 // } | 1127 // } |
| 1122 // output: none | 1128 // output: none |
| 1123 void AcceptOrDismissAppModalDialog( | 1129 void AcceptOrDismissAppModalDialog( |
| 1124 DictionaryValue* args, IPC::Message* reply_message); | 1130 base::DictionaryValue* args, IPC::Message* reply_message); |
| 1125 | 1131 |
| 1126 // Activates the given tab. | 1132 // Activates the given tab. |
| 1127 // Example: | 1133 // Example: |
| 1128 // input: { "windex": 1, | 1134 // input: { "windex": 1, |
| 1129 // "tab_index": 1, | 1135 // "tab_index": 1, |
| 1130 // } | 1136 // } |
| 1131 // output: none | 1137 // output: none |
| 1132 void ActivateTabJSON(DictionaryValue* args, IPC::Message* message); | 1138 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message); |
| 1133 | 1139 |
| 1134 // Gets the version of ChromeDriver automation supported by this server. | 1140 // Gets the version of ChromeDriver automation supported by this server. |
| 1135 // Example: | 1141 // Example: |
| 1136 // input: none | 1142 // input: none |
| 1137 // output: { "version": 1 } | 1143 // output: { "version": 1 } |
| 1138 void GetChromeDriverAutomationVersion(DictionaryValue* args, | 1144 void GetChromeDriverAutomationVersion(base::DictionaryValue* args, |
| 1139 IPC::Message* message); | 1145 IPC::Message* message); |
| 1140 | 1146 |
| 1141 // Auto-updates installed extensions. | 1147 // Auto-updates installed extensions. |
| 1142 // Uses the JSON interface for input/output. | 1148 // Uses the JSON interface for input/output. |
| 1143 void UpdateExtensionsNow(DictionaryValue* args, IPC::Message* reply_message); | 1149 void UpdateExtensionsNow(base::DictionaryValue* args, |
| 1150 IPC::Message* reply_message); |
| 1144 | 1151 |
| 1145 #if defined(OS_CHROMEOS) | 1152 #if defined(OS_CHROMEOS) |
| 1146 void GetLoginInfo(DictionaryValue* args, IPC::Message* reply_message); | 1153 void GetLoginInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1147 | 1154 |
| 1148 void ShowCreateAccountUI(DictionaryValue* args, IPC::Message* reply_message); | 1155 void ShowCreateAccountUI(base::DictionaryValue* args, |
| 1156 IPC::Message* reply_message); |
| 1149 | 1157 |
| 1150 void LoginAsGuest(DictionaryValue* args, IPC::Message* reply_message); | 1158 void LoginAsGuest(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1151 | 1159 |
| 1152 void Login(DictionaryValue* args, IPC::Message* reply_message); | 1160 void Login(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1153 | 1161 |
| 1154 void LockScreen(DictionaryValue* args, IPC::Message* reply_message); | 1162 void LockScreen(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1155 | 1163 |
| 1156 void UnlockScreen(DictionaryValue* args, IPC::Message* reply_message); | 1164 void UnlockScreen(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1157 | 1165 |
| 1158 void SignoutInScreenLocker(DictionaryValue* args, | 1166 void SignoutInScreenLocker(base::DictionaryValue* args, |
| 1159 IPC::Message* reply_message); | 1167 IPC::Message* reply_message); |
| 1160 | 1168 |
| 1161 void GetBatteryInfo(DictionaryValue* args, IPC::Message* reply_message); | 1169 void GetBatteryInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1162 | 1170 |
| 1163 void GetNetworkInfo(DictionaryValue* args, IPC::Message* reply_message); | 1171 void GetNetworkInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1164 | 1172 |
| 1165 void NetworkScan(DictionaryValue* args, IPC::Message* reply_message); | 1173 void NetworkScan(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1166 | 1174 |
| 1167 void GetProxySettings(DictionaryValue* args, IPC::Message* reply_message); | 1175 void GetProxySettings(base::DictionaryValue* args, |
| 1176 IPC::Message* reply_message); |
| 1168 | 1177 |
| 1169 void SetProxySettings(DictionaryValue* args, IPC::Message* reply_message); | 1178 void SetProxySettings(base::DictionaryValue* args, |
| 1179 IPC::Message* reply_message); |
| 1170 | 1180 |
| 1171 void ConnectToWifiNetwork(DictionaryValue* args, IPC::Message* reply_message); | 1181 void ConnectToWifiNetwork(base::DictionaryValue* args, |
| 1182 IPC::Message* reply_message); |
| 1172 | 1183 |
| 1173 void ConnectToHiddenWifiNetwork(DictionaryValue* args, | 1184 void ConnectToHiddenWifiNetwork(base::DictionaryValue* args, |
| 1174 IPC::Message* reply_message); | 1185 IPC::Message* reply_message); |
| 1175 | 1186 |
| 1176 void DisconnectFromWifiNetwork(DictionaryValue* args, | 1187 void DisconnectFromWifiNetwork(base::DictionaryValue* args, |
| 1177 IPC::Message* reply_message); | 1188 IPC::Message* reply_message); |
| 1178 | 1189 |
| 1179 // VPN automation | 1190 // VPN automation |
| 1180 void AddPrivateNetwork(DictionaryValue* args, IPC::Message* reply_message); | 1191 void AddPrivateNetwork(base::DictionaryValue* args, |
| 1192 IPC::Message* reply_message); |
| 1181 | 1193 |
| 1182 void GetPrivateNetworkInfo(DictionaryValue* args, | 1194 void GetPrivateNetworkInfo(base::DictionaryValue* args, |
| 1183 IPC::Message* reply_message); | 1195 IPC::Message* reply_message); |
| 1184 | 1196 |
| 1185 void ConnectToPrivateNetwork(DictionaryValue* args, | 1197 void ConnectToPrivateNetwork(base::DictionaryValue* args, |
| 1186 IPC::Message* reply_message); | 1198 IPC::Message* reply_message); |
| 1187 | 1199 |
| 1188 void DisconnectFromPrivateNetwork(DictionaryValue* args, | 1200 void DisconnectFromPrivateNetwork(base::DictionaryValue* args, |
| 1189 IPC::Message* reply_message); | 1201 IPC::Message* reply_message); |
| 1190 | 1202 |
| 1191 void ForgetWifiNetwork(DictionaryValue* args, IPC::Message* reply_message); | 1203 void ForgetWifiNetwork(base::DictionaryValue* args, |
| 1204 IPC::Message* reply_message); |
| 1192 | 1205 |
| 1193 void GetUpdateInfo(DictionaryValue* args, IPC::Message* reply_message); | 1206 void GetUpdateInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1194 | 1207 |
| 1195 void UpdateCheck(DictionaryValue* args, IPC::Message* reply_message); | 1208 void UpdateCheck(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1196 | 1209 |
| 1197 void SetReleaseTrack(DictionaryValue* args, IPC::Message* reply_message); | 1210 void SetReleaseTrack(base::DictionaryValue* args, |
| 1211 IPC::Message* reply_message); |
| 1198 | 1212 |
| 1199 void GetVolumeInfo(DictionaryValue* args, IPC::Message* reply_message); | 1213 void GetVolumeInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1200 | 1214 |
| 1201 void SetVolume(DictionaryValue* args, IPC::Message* reply_message); | 1215 void SetVolume(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1202 | 1216 |
| 1203 void SetMute(DictionaryValue* args, IPC::Message* reply_message); | 1217 void SetMute(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1204 #endif // defined(OS_CHROMEOS) | 1218 #endif // defined(OS_CHROMEOS) |
| 1205 | 1219 |
| 1206 void WaitForTabCountToBecome(int browser_handle, | 1220 void WaitForTabCountToBecome(int browser_handle, |
| 1207 int target_tab_count, | 1221 int target_tab_count, |
| 1208 IPC::Message* reply_message); | 1222 IPC::Message* reply_message); |
| 1209 | 1223 |
| 1210 void WaitForInfoBarCount(int tab_handle, | 1224 void WaitForInfoBarCount(int tab_handle, |
| 1211 size_t target_count, | 1225 size_t target_count, |
| 1212 IPC::Message* reply_message); | 1226 IPC::Message* reply_message); |
| 1213 | 1227 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 // Used to enumerate browser profiles. | 1280 // Used to enumerate browser profiles. |
| 1267 scoped_refptr<ImporterList> importer_list_; | 1281 scoped_refptr<ImporterList> importer_list_; |
| 1268 | 1282 |
| 1269 // The stored data for the ImportSettings operation. | 1283 // The stored data for the ImportSettings operation. |
| 1270 ImportSettingsData import_settings_data_; | 1284 ImportSettingsData import_settings_data_; |
| 1271 | 1285 |
| 1272 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1286 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1273 }; | 1287 }; |
| 1274 | 1288 |
| 1275 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1289 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |