| 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 | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #include "platform/UserGestureIndicator.h" | 33 #include "platform/UserGestureIndicator.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 bool WebUserGestureToken::hasGestures() const { | 37 bool WebUserGestureToken::hasGestures() const { |
| 38 return !m_token.isNull() && m_token->hasGestures(); | 38 return !m_token.isNull() && m_token->hasGestures(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void WebUserGestureToken::setOutOfProcess() { | 41 void WebUserGestureToken::setOutOfProcess() { |
| 42 m_token->setOutOfProcess(); | 42 m_token->setTimeoutPolicy(UserGestureToken::OutOfProcess); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void WebUserGestureToken::setJavascriptPrompt() { | 45 void WebUserGestureToken::setJavascriptPrompt() { |
| 46 m_token->setJavascriptPrompt(); | 46 m_token->setTimeoutPolicy(UserGestureToken::HasPaused); |
| 47 } | 47 } |
| 48 | 48 |
| 49 WebUserGestureToken::WebUserGestureToken(PassRefPtr<UserGestureToken> token) { | 49 WebUserGestureToken::WebUserGestureToken(PassRefPtr<UserGestureToken> token) { |
| 50 m_token = token; | 50 m_token = token; |
| 51 } | 51 } |
| 52 | 52 |
| 53 WebUserGestureToken::operator PassRefPtr<UserGestureToken>() const { | 53 WebUserGestureToken::operator PassRefPtr<UserGestureToken>() const { |
| 54 return m_token.get(); | 54 return m_token.get(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WebUserGestureToken::assign(const WebUserGestureToken& other) { | 57 void WebUserGestureToken::assign(const WebUserGestureToken& other) { |
| 58 m_token = other.m_token; | 58 m_token = other.m_token; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void WebUserGestureToken::reset() { | 61 void WebUserGestureToken::reset() { |
| 62 m_token.reset(); | 62 m_token.reset(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| OLD | NEW |