| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 virtual void ResetPermissions() = 0; | 250 virtual void ResetPermissions() = 0; |
| 251 | 251 |
| 252 // Add content MediaStream classes to the Blink MediaStream ones. | 252 // Add content MediaStream classes to the Blink MediaStream ones. |
| 253 virtual bool AddMediaStreamVideoSourceAndTrack( | 253 virtual bool AddMediaStreamVideoSourceAndTrack( |
| 254 blink::WebMediaStream* stream) = 0; | 254 blink::WebMediaStream* stream) = 0; |
| 255 virtual bool AddMediaStreamAudioSourceAndTrack( | 255 virtual bool AddMediaStreamAudioSourceAndTrack( |
| 256 blink::WebMediaStream* stream) = 0; | 256 blink::WebMediaStream* stream) = 0; |
| 257 | 257 |
| 258 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; | 258 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; |
| 259 | 259 |
| 260 // Causes the beforeinstallprompt event to be sent to the renderer with a | 260 // Causes the beforeinstallprompt event to be sent to the renderer. |
| 261 // request id of |request_id|. |event_platforms| are the platforms to be sent | 261 // |event_platforms| are the platforms to be sent with the event. Once the |
| 262 // with the event. Once the event listener completes, |callback| will be | 262 // event listener completes, |callback| will be called with a boolean |
| 263 // called with a boolean argument. This argument will be true if the event is | 263 // argument. This argument will be true if the event is canceled, and false |
| 264 // canceled, and false otherwise. | 264 // otherwise. |
| 265 virtual void DispatchBeforeInstallPromptEvent( | 265 virtual void DispatchBeforeInstallPromptEvent( |
| 266 int request_id, | |
| 267 const std::vector<std::string>& event_platforms, | 266 const std::vector<std::string>& event_platforms, |
| 268 const base::Callback<void(bool)>& callback) = 0; | 267 const base::Callback<void(bool)>& callback) = 0; |
| 269 | 268 |
| 269 // Resolves the in-flight beforeinstallprompt event userChoice promise with a |
| 270 // platform of |platform|. |
| 271 virtual void ResolveBeforeInstallPromptPromise( |
| 272 const std::string& platform) = 0; |
| 273 |
| 270 virtual blink::WebPlugin* CreatePluginPlaceholder( | 274 virtual blink::WebPlugin* CreatePluginPlaceholder( |
| 271 blink::WebLocalFrame* frame, | 275 blink::WebLocalFrame* frame, |
| 272 const blink::WebPluginParams& params) = 0; | 276 const blink::WebPluginParams& params) = 0; |
| 273 | 277 |
| 274 virtual float GetDeviceScaleFactor() const = 0; | 278 virtual float GetDeviceScaleFactor() const = 0; |
| 275 | 279 |
| 276 // Run all pending idle tasks, and then run callback. | 280 // Run all pending idle tasks, and then run callback. |
| 277 virtual void RunIdleTasks(const base::Closure& callback) = 0; | 281 virtual void RunIdleTasks(const base::Closure& callback) = 0; |
| 278 }; | 282 }; |
| 279 | 283 |
| 280 } // namespace test_runner | 284 } // namespace test_runner |
| 281 | 285 |
| 282 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 286 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| OLD | NEW |