OLD | NEW |
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 CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_RENDERER_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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 void AddWebPageOverlay(); | 535 void AddWebPageOverlay(); |
536 void RemoveWebPageOverlay(); | 536 void RemoveWebPageOverlay(); |
537 | 537 |
538 void DisplayAsync(); | 538 void DisplayAsync(); |
539 void DisplayAsyncThen(v8::Handle<v8::Function> callback); | 539 void DisplayAsyncThen(v8::Handle<v8::Function> callback); |
540 | 540 |
541 // Similar to DisplayAsyncThen(), but pass parameters of the captured | 541 // Similar to DisplayAsyncThen(), but pass parameters of the captured |
542 // snapshot (width, height, snapshot) to the callback. The snapshot is in | 542 // snapshot (width, height, snapshot) to the callback. The snapshot is in |
543 // uint8 RGBA format. | 543 // uint8 RGBA format. |
544 void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback); | 544 void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback); |
| 545 // Similar to CapturePixelsAsyncThen(). Copies to the clipboard the image |
| 546 // located at a particular point in the WebView (if there is such an image), |
| 547 // reads back its pixels, and provides the snapshot to the callback. If there |
| 548 // is no image at that point, calls the callback with (0, 0, empty_snapshot). |
| 549 void CopyImageAtAndCapturePixelsAsyncThen( |
| 550 int x, int y, const v8::Handle<v8::Function> callback); |
545 | 551 |
546 void SetMockPushClientSuccess(const std::string& endpoint, | 552 void SetMockPushClientSuccess(const std::string& endpoint, |
547 const std::string& registration_id); | 553 const std::string& registration_id); |
548 void SetMockPushClientError(const std::string& message); | 554 void SetMockPushClientError(const std::string& message); |
549 | 555 |
550 /////////////////////////////////////////////////////////////////////////// | 556 /////////////////////////////////////////////////////////////////////////// |
551 // Internal helpers | 557 // Internal helpers |
552 | 558 |
553 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, | 559 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, |
554 const SkBitmap& snapshot); | 560 const SkBitmap& snapshot); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 bool use_mock_theme_; | 761 bool use_mock_theme_; |
756 | 762 |
757 base::WeakPtrFactory<TestRunner> weak_factory_; | 763 base::WeakPtrFactory<TestRunner> weak_factory_; |
758 | 764 |
759 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 765 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
760 }; | 766 }; |
761 | 767 |
762 } // namespace content | 768 } // namespace content |
763 | 769 |
764 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 770 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |