Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 80 |
| 81 bool allowedToRequestFullscreen(Document& document) { | 81 bool allowedToRequestFullscreen(Document& document) { |
| 82 // An algorithm is allowed to request fullscreen if one of the following is | 82 // An algorithm is allowed to request fullscreen if one of the following is |
| 83 // true: | 83 // true: |
| 84 | 84 |
| 85 // The algorithm is triggered by a user activation. | 85 // The algorithm is triggered by a user activation. |
| 86 if (UserGestureIndicator::utilizeUserGesture()) | 86 if (UserGestureIndicator::utilizeUserGesture()) |
| 87 return true; | 87 return true; |
| 88 | 88 |
| 89 // The algorithm is triggered by a user generated orientation change. | 89 // The algorithm is triggered by a user generated orientation change. |
| 90 if (ScopedOrientationChangeIndicator::processingOrientationChange()) | 90 if (ScopedOrientationChangeIndicator::processingOrientationChange()) { |
| 91 UseCounter::count(document(), UseCounter::FullscreenOnOrientationChange); | |
|
foolip
2016/12/07 08:58:32
Does this actually compile? Should be just documen
foolip
2016/12/07 08:58:32
Suggest FullscreenAllowedByOrientationChange, sinc
Zhiqiang Zhang (Slow)
2016/12/07 11:49:58
Done.
Zhiqiang Zhang (Slow)
2016/12/07 11:49:58
Done.
| |
| 91 return true; | 92 return true; |
| 93 } | |
| 92 | 94 |
| 93 String message = ExceptionMessages::failedToExecute( | 95 String message = ExceptionMessages::failedToExecute( |
| 94 "requestFullscreen", "Element", | 96 "requestFullscreen", "Element", |
| 95 "API can only be initiated by a user gesture."); | 97 "API can only be initiated by a user gesture."); |
| 96 document.addConsoleMessage( | 98 document.addConsoleMessage( |
| 97 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); | 99 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); |
| 98 | 100 |
| 99 return false; | 101 return false; |
| 100 } | 102 } |
| 101 | 103 |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 767 | 769 |
| 768 DEFINE_TRACE(Fullscreen) { | 770 DEFINE_TRACE(Fullscreen) { |
| 769 visitor->trace(m_currentFullScreenElement); | 771 visitor->trace(m_currentFullScreenElement); |
| 770 visitor->trace(m_fullscreenElementStack); | 772 visitor->trace(m_fullscreenElementStack); |
| 771 visitor->trace(m_eventQueue); | 773 visitor->trace(m_eventQueue); |
| 772 Supplement<Document>::trace(visitor); | 774 Supplement<Document>::trace(visitor); |
| 773 ContextLifecycleObserver::trace(visitor); | 775 ContextLifecycleObserver::trace(visitor); |
| 774 } | 776 } |
| 775 | 777 |
| 776 } // namespace blink | 778 } // namespace blink |
| OLD | NEW |