| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 | 5 |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * This file defines the <code>PPB_Fullscreen</code> interface. | 8 * This file defines the <code>PPB_Fullscreen_Dev</code> interface. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 label Chrome { | 11 label Chrome { |
| 12 M14 = 0.4 | 12 M16 = 0.5 |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 interface PPB_Fullscreen_Dev { | 15 interface PPB_Fullscreen_Dev { |
| 16 /** | 16 /** |
| 17 * Checks whether the plugin instance is currently in fullscreen mode. | 17 * Checks whether the plugin instance is currently in fullscreen mode. |
| 18 */ | 18 */ |
| 19 PP_Bool IsFullscreen( | 19 PP_Bool IsFullscreen( |
| 20 [in] PP_Instance instance); | 20 [in] PP_Instance instance); |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on | 23 * Switches the plugin instance to/from fullscreen mode. Returns PP_TRUE on |
| 24 * success, PP_FALSE on failure. | 24 * success, PP_FALSE on failure. |
| 25 * | 25 * |
| 26 * This unbinds the current Graphics2D or Surface3D. Pending flushes and | 26 * This unbinds the current 2D or 3D devices. Pending flushes and swapbuffers |
| 27 * swapbuffers will execute as if the resource was off-screen. The transition | 27 * will execute as if the resource was off-screen. The transition to and from |
| 28 * is asynchronous. During the transition, IsFullscreen will return PP_False, | 28 * fullscreen is asynchronous. During the transition, IsFullscreen will |
| 29 * and no Graphics2D or Surface3D can be bound. The transition ends at the | 29 * return the original value, and no 2D or 3D device can be bound. |
| 30 * next DidChangeView. | 30 * The transition ends at the next DidChangeView. |
| 31 * | 31 * |
| 32 * Note: when switching to and from fullscreen, Context3D and Surface3D | 32 * The transition to fullscreen can only occur while the browser is |
| 33 * resources need to be re-created. This is a current limitation that will be | 33 * processing a user gesture, even if PP_TRUE is returned. Note that two |
| 34 * lifted in a later revision. | 34 * DidChangeView calls will happen when switching to fullscreen: |
| 35 * one for moving the plugin to the middle of the window and one for |
| 36 * stretching the window placing the plugin in the middle of the screen. |
| 37 * Plugin size will not be affected. |
| 35 */ | 38 */ |
| 36 PP_Bool SetFullscreen( | 39 PP_Bool SetFullscreen( |
| 37 [in] PP_Instance instance, | 40 [in] PP_Instance instance, |
| 38 [in] PP_Bool fullscreen); | 41 [in] PP_Bool fullscreen); |
| 39 | 42 |
| 40 /** | 43 /** |
| 41 * Gets the size of the screen. When going fullscreen, the instance will be | 44 * Gets the size of the screen in pixels. When going fullscreen, the instance |
| 42 * resized to that size. | 45 * will be resized to that size. |
| 43 */ | 46 */ |
| 44 PP_Bool GetScreenSize( | 47 PP_Bool GetScreenSize( |
| 45 [in] PP_Instance instance, | 48 [in] PP_Instance instance, |
| 46 [out] PP_Size size); | 49 [out] PP_Size size); |
| 47 }; | 50 }; |
| 48 | 51 |
| OLD | NEW |