Refactor android test results logging.
[chromium-blink-merge.git] / ppapi / api / private / ppb_flash_message_loop.idl
blob48749072a50717a7b4034d0ebeb904dd7cb97013
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
6 /**
7 * This file contains the <code>PPB_Flash_MessageLoop</code> interface.
8 */
10 label Chrome {
11 M18 = 0.1
14 /**
15 * The <code>PPB_Flash_MessageLoop</code> interface supports Pepper Flash to run
16 * nested message loops.
18 interface PPB_Flash_MessageLoop {
19 /**
20 * Allocates a Flash message loop resource.
22 * @param[in] instance A <code>PP_Instance</code> identifying one instance
23 * of a module.
25 * @return A <code>PP_Resource</code> that can be used to run a nested message
26 * loop if successful; 0 if failed.
28 PP_Resource Create([in] PP_Instance instance);
30 /**
31 * Determines if a given resource is a Flash message loop.
33 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
34 * resource.
36 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given
37 * resource is a Flash message loop, otherwise <code>PP_FALSE</code>.
39 PP_Bool IsFlashMessageLoop([in] PP_Resource resource);
41 /**
42 * Runs a nested message loop. The plugin will be reentered from this call.
43 * This function is used in places where Flash would normally enter a nested
44 * message loop (e.g., when displaying context menus), but Pepper provides
45 * only an asynchronous call. After performing that asynchronous call, call
46 * <code>Run()</code>. In the callback, call <code>Quit()</code>.
48 * For a given message loop resource, only the first call to
49 * <code>Run()</code> will start a nested message loop. The subsequent calls
50 * will return <code>PP_ERROR_FAILED</code> immediately.
52 * @param[in] flash_message_loop The Flash message loop.
54 * @return <code>PP_ERROR_ABORTED</code> if the message loop quits because the
55 * resource is destroyed; <code>PP_OK</code> if the message loop quits because
56 * of other reasons (e.g., <code>Quit()</code> is called);
57 * <code>PP_ERROR_FAILED</code> if this is not the first call to
58 * <code>Run()</code>.
60 int32_t Run([in] PP_Resource flash_message_loop);
62 /**
63 * Signals to quit the outermost nested message loop. Use this to exit and
64 * return back to the caller after you call <code>Run()</code>.
66 * If <code>Quit()</code> is not called to balance the call to
67 * <code>Run()</code>, the outermost nested message loop will be quitted
68 * implicitly when the resource is destroyed.
70 * @param[in] flash_message_loop The Flash message loop.
72 void Quit([in] PP_Resource flash_message_loop);