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

Side by Side Diff: components/test_runner/test_runner.h

Issue 1351393002: Make getBluetoothManualChooserEvents() asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Go back to the callback interface. Created 5 years, 3 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
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 v8::Local<v8::Function> callback); 522 v8::Local<v8::Function> callback);
523 523
524 // Change the bluetooth test data while running a layout test and resets the 524 // Change the bluetooth test data while running a layout test and resets the
525 // chooser to accept the first device. 525 // chooser to accept the first device.
526 void SetBluetoothMockDataSet(const std::string& name); 526 void SetBluetoothMockDataSet(const std::string& name);
527 527
528 // Makes the Bluetooth chooser record its input and wait for instructions from 528 // Makes the Bluetooth chooser record its input and wait for instructions from
529 // the test program on how to proceed. 529 // the test program on how to proceed.
530 void SetBluetoothManualChooser(); 530 void SetBluetoothManualChooser();
531 531
532 // Returns the events recorded since the last call to this function. 532 // Calls |callback| with a DOMString[] representing the events recorded since
533 std::vector<std::string> GetBluetoothManualChooserEvents(); 533 // the last call to this function.
534 void GetBluetoothManualChooserEvents(v8::Local<v8::Function> callback);
534 535
535 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid 536 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid
536 // event strings are: 537 // event strings are:
537 // * "cancel" - simulates the user canceling the chooser. 538 // * "cancel" - simulates the user canceling the chooser.
538 // * "select" - simulates the user selecting a device whose device ID is in 539 // * "select" - simulates the user selecting a device whose device ID is in
539 // |argument|. 540 // |argument|.
540 void SendBluetoothManualChooserEvent(const std::string& event, 541 void SendBluetoothManualChooserEvent(const std::string& event,
541 const std::string& argument); 542 const std::string& argument);
542 543
543 // Enables mock geofencing service while running a layout test. 544 // Enables mock geofencing service while running a layout test.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 /////////////////////////////////////////////////////////////////////////// 617 ///////////////////////////////////////////////////////////////////////////
617 // Internal helpers 618 // Internal helpers
618 619
619 void GetManifestCallback(scoped_ptr<InvokeCallbackTask> task, 620 void GetManifestCallback(scoped_ptr<InvokeCallbackTask> task,
620 const blink::WebURLResponse& response, 621 const blink::WebURLResponse& response,
621 const std::string& data); 622 const std::string& data);
622 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, 623 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task,
623 const SkBitmap& snapshot); 624 const SkBitmap& snapshot);
624 void DispatchBeforeInstallPromptCallback(scoped_ptr<InvokeCallbackTask> task, 625 void DispatchBeforeInstallPromptCallback(scoped_ptr<InvokeCallbackTask> task,
625 bool canceled); 626 bool canceled);
627 void GetBluetoothManualChooserEventsCallback(
628 scoped_ptr<InvokeCallbackTask> task,
629 const std::vector<std::string>& events);
626 630
627 void CheckResponseMimeType(); 631 void CheckResponseMimeType();
628 void CompleteNotifyDone(); 632 void CompleteNotifyDone();
629 633
630 void DidAcquirePointerLockInternal(); 634 void DidAcquirePointerLockInternal();
631 void DidNotAcquirePointerLockInternal(); 635 void DidNotAcquirePointerLockInternal();
632 void DidLosePointerLockInternal(); 636 void DidLosePointerLockInternal();
633 637
634 // In the Mac code, this is called to trigger the end of a test after the 638 // In the Mac code, this is called to trigger the end of a test after the
635 // page has finished loading. From here, we can generate the dump for the 639 // page has finished loading. From here, we can generate the dump for the
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 bool use_mock_theme_; 837 bool use_mock_theme_;
834 838
835 base::WeakPtrFactory<TestRunner> weak_factory_; 839 base::WeakPtrFactory<TestRunner> weak_factory_;
836 840
837 DISALLOW_COPY_AND_ASSIGN(TestRunner); 841 DISALLOW_COPY_AND_ASSIGN(TestRunner);
838 }; 842 };
839 843
840 } // namespace test_runner 844 } // namespace test_runner
841 845
842 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 846 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698