| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef DocumentUserGestureToken_h | 5 #ifndef DocumentUserGestureToken_h |
| 6 #define DocumentUserGestureToken_h | 6 #define DocumentUserGestureToken_h |
| 7 | 7 |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/loader/FrameLoaderClient.h" | 10 #include "core/frame/LocalFrameClient.h" |
| 11 #include "platform/UserGestureIndicator.h" | 11 #include "platform/UserGestureIndicator.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 // Associates a UserGestureToken with a Document, if a non-null Document* | 15 // Associates a UserGestureToken with a Document, if a non-null Document* |
| 16 // is provided in the constructor. | 16 // is provided in the constructor. |
| 17 class DocumentUserGestureToken final : public UserGestureToken { | 17 class DocumentUserGestureToken final : public UserGestureToken { |
| 18 WTF_MAKE_NONCOPYABLE(DocumentUserGestureToken); | 18 WTF_MAKE_NONCOPYABLE(DocumentUserGestureToken); |
| 19 | 19 |
| 20 public: | 20 public: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 !document->frame()->hasReceivedUserGesture()) { | 41 !document->frame()->hasReceivedUserGesture()) { |
| 42 document->frame()->setDocumentHasReceivedUserGesture(); | 42 document->frame()->setDocumentHasReceivedUserGesture(); |
| 43 document->frame()->loader().client()->setHasReceivedUserGesture(); | 43 document->frame()->loader().client()->setHasReceivedUserGesture(); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace blink | 48 } // namespace blink |
| 49 | 49 |
| 50 #endif // DocumentUserGestureToken_h | 50 #endif // DocumentUserGestureToken_h |
| OLD | NEW |