OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013, Google Inc. All rights reserved. | 2 * Copyright (C) 2013, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... |
23 * DAMAGE. | 23 * DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/dom/DocumentFullscreen.h" | 27 #include "core/dom/DocumentFullscreen.h" |
28 | 28 |
29 #include "core/dom/FullscreenElementStack.h" | 29 #include "core/dom/FullscreenElementStack.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
| 33 bool DocumentFullscreen::fullscreenEnabled(Document& document) |
| 34 { |
| 35 return FullscreenElementStack::fullscreenEnabled(document); |
| 36 } |
| 37 |
| 38 Element* DocumentFullscreen::fullscreenElement(Document& document) |
| 39 { |
| 40 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) |
| 41 return fullscreen->fullscreenElement(); |
| 42 return 0; |
| 43 } |
| 44 |
| 45 void DocumentFullscreen::exitFullscreen(Document& document) |
| 46 { |
| 47 FullscreenElementStack::from(document).exitFullscreen(); |
| 48 } |
| 49 |
33 bool DocumentFullscreen::webkitIsFullScreen(Document& document) | 50 bool DocumentFullscreen::webkitIsFullScreen(Document& document) |
34 { | 51 { |
35 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) | 52 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) |
36 return fullscreen->webkitIsFullScreen(); | 53 return fullscreen->webkitIsFullScreen(); |
37 return false; | 54 return false; |
38 } | 55 } |
39 | 56 |
40 bool DocumentFullscreen::webkitFullScreenKeyboardInputAllowed(Document& document
) | 57 bool DocumentFullscreen::webkitFullScreenKeyboardInputAllowed(Document& document
) |
41 { | 58 { |
42 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) | 59 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) |
43 return fullscreen->webkitFullScreenKeyboardInputAllowed(); | 60 return fullscreen->webkitFullScreenKeyboardInputAllowed(); |
44 return false; | 61 return false; |
45 } | 62 } |
46 | 63 |
47 Element* DocumentFullscreen::webkitCurrentFullScreenElement(Document& document) | 64 Element* DocumentFullscreen::webkitCurrentFullScreenElement(Document& document) |
48 { | 65 { |
49 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) | 66 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) |
50 return fullscreen->webkitCurrentFullScreenElement(); | 67 return fullscreen->webkitCurrentFullScreenElement(); |
51 return 0; | 68 return 0; |
52 } | 69 } |
53 | 70 |
54 bool DocumentFullscreen::webkitFullscreenEnabled(Document& document) | |
55 { | |
56 return FullscreenElementStack::fullscreenEnabled(document); | |
57 } | |
58 | |
59 Element* DocumentFullscreen::webkitFullscreenElement(Document& document) | |
60 { | |
61 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(document)) | |
62 return fullscreen->fullscreenElement(); | |
63 return 0; | |
64 } | |
65 | |
66 void DocumentFullscreen::webkitExitFullscreen(Document& document) | |
67 { | |
68 FullscreenElementStack::from(document).exitFullscreen(); | |
69 } | |
70 | |
71 } // namespace blink | 71 } // namespace blink |
OLD | NEW |