| OLD | NEW |
| 1 // Copyright 2013 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 COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // Causes the beforeinstallprompt event to be sent to the renderer with a | 260 // Causes the beforeinstallprompt event to be sent to the renderer with a |
| 261 // request id of |request_id|. |event_platforms| are the platforms to be sent | 261 // request id of |request_id|. |event_platforms| are the platforms to be sent |
| 262 // with the event. Once the event listener completes, |callback| will be | 262 // with the event. Once the event listener completes, |callback| will be |
| 263 // called with a boolean argument. This argument will be true if the event is | 263 // called with a boolean argument. This argument will be true if the event is |
| 264 // canceled, and false otherwise. | 264 // canceled, and false otherwise. |
| 265 virtual void DispatchBeforeInstallPromptEvent( | 265 virtual void DispatchBeforeInstallPromptEvent( |
| 266 int request_id, | 266 int request_id, |
| 267 const std::vector<std::string>& event_platforms, | 267 const std::vector<std::string>& event_platforms, |
| 268 const base::Callback<void(bool)>& callback) = 0; | 268 const base::Callback<void(bool)>& callback) = 0; |
| 269 | 269 |
| 270 // Resolves the beforeinstallprompt event userChoice promise with a request id |
| 271 // of |request_id| and platform of |platform|. |
| 272 virtual void ResolveBeforeInstallPromptPromise( |
| 273 int request_id, |
| 274 const std::string& platform) = 0; |
| 275 |
| 270 virtual blink::WebPlugin* CreatePluginPlaceholder( | 276 virtual blink::WebPlugin* CreatePluginPlaceholder( |
| 271 blink::WebLocalFrame* frame, | 277 blink::WebLocalFrame* frame, |
| 272 const blink::WebPluginParams& params) = 0; | 278 const blink::WebPluginParams& params) = 0; |
| 273 | 279 |
| 274 virtual float GetDeviceScaleFactor() const = 0; | 280 virtual float GetDeviceScaleFactor() const = 0; |
| 275 | 281 |
| 276 // Run all pending idle tasks, and then run callback. | 282 // Run all pending idle tasks, and then run callback. |
| 277 virtual void RunIdleTasks(const base::Closure& callback) = 0; | 283 virtual void RunIdleTasks(const base::Closure& callback) = 0; |
| 278 }; | 284 }; |
| 279 | 285 |
| 280 } // namespace test_runner | 286 } // namespace test_runner |
| 281 | 287 |
| 282 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 288 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| OLD | NEW |