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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // Causes the beforeinstallprompt event to be sent to the renderer with a | 272 // Causes the beforeinstallprompt event to be sent to the renderer with a |
273 // request id of |request_id|. |event_platforms| are the platforms to be sent | 273 // request id of |request_id|. |event_platforms| are the platforms to be sent |
274 // with the event. Once the event listener completes, |callback| will be | 274 // with the event. Once the event listener completes, |callback| will be |
275 // called with a boolean argument. This argument will be true if the event is | 275 // called with a boolean argument. This argument will be true if the event is |
276 // canceled, and false otherwise. | 276 // canceled, and false otherwise. |
277 virtual void DispatchBeforeInstallPromptEvent( | 277 virtual void DispatchBeforeInstallPromptEvent( |
278 int request_id, | 278 int request_id, |
279 const std::vector<std::string>& event_platforms, | 279 const std::vector<std::string>& event_platforms, |
280 const base::Callback<void(bool)>& callback) = 0; | 280 const base::Callback<void(bool)>& callback) = 0; |
281 | 281 |
282 // Resolve the promise associated with the beforeinstallprompt even with | |
283 // request id |request_id|. The promise is resolved with a result.platform set | |
284 // to |platform|. If |platform| is not empty, result.outcome will be | |
285 // 'accepted', otherwise it will be 'dismissed'. | |
286 virtual void ResolveBeforeInstallPromptPromise( | |
287 int request_id, | |
288 const std::string& platform) = 0; | |
289 | |
290 virtual blink::WebPlugin* CreatePluginPlaceholder( | 282 virtual blink::WebPlugin* CreatePluginPlaceholder( |
291 blink::WebLocalFrame* frame, | 283 blink::WebLocalFrame* frame, |
292 const blink::WebPluginParams& params) = 0; | 284 const blink::WebPluginParams& params) = 0; |
293 | 285 |
294 // Convert the position in DIP to native coordinates. | 286 // Convert the position in DIP to native coordinates. |
295 virtual blink::WebPoint ConvertDIPToNative( | 287 virtual blink::WebPoint ConvertDIPToNative( |
296 const blink::WebPoint& point_in_dip) const = 0; | 288 const blink::WebPoint& point_in_dip) const = 0; |
297 }; | 289 }; |
298 | 290 |
299 } // namespace test_runner | 291 } // namespace test_runner |
300 | 292 |
301 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 293 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
OLD | NEW |