Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: third_party/WebKit/Source/web/WebUserGestureToken.cpp

Issue 2401123002: UserGestureIndicator is a mess. Clean it up. (Closed)
Patch Set: Callback cleanup, comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebScopedUserGesture.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698