blob: 63214e20b39c14d5e51f32fa0cb7b835c70311d5 [file] [log] [blame]
<!DOCTYPE html>
Copyright (c) 2012 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<script type="text/javascript" src="common.js"></script>
<body data-name="<NAME>" data-tc="<tc>" data-path="<path>" data-width="300"
<h2>Status: <code id="statusField">NO-STATUS</code></h2>
<h1>Full-screen and Mouse-lock Example</h1>
<li>There are two different kinds of fullscreen mode: "tab fullscreen" and
"browser fullscreen".
<li>Tab fullscreen refers to when a tab enters fullscreen mode via the
JS or Pepper fullscreen API.</li>
<li>Browser fullscreen refers to the user putting the browser itself
into fullscreen mode from the UI (e.g., pressing F11).</li>
<span style="font-weight:bold">
NOTE: Mouse lock is only allowed in "tab fullscreen" mode.
<li>Lock mouse:
<li>left click in the grey box; or</li>
<li>right click in the box to ensure that it is focused and
then press Enter key. (You could verify that the tooltip window is
dismissed properly by this second approach.)</li>
<li>Unlock mouse voluntarily (i.e., NaCl module unlocks mouse):
<li>press Enter.</li>
<li>Unlock mouse involuntarily (i.e. Chrome unlocks mouse):
<li>lose focus; or</li>
<li>press Esc key; or</li>
<li>exit from the "tab fullscreen" mode.</li>
<p>Clicking the mouse inside the grey square takes the NaCl module to/from
combined fullscreen and mouselock mode.</p>
<p>While in fullscreen, pressing Enter will exit/enter mouse lock mode.</p>
<!-- The NaCl plugin will be embedded inside the element with id "listener".
See common.js.-->
<div id="listener"></div>