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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2850983002: Remove UserGestureUtilizedCallback, it's unused outside of tests (Closed)
Patch Set: Created 3 years, 7 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 return false; 263 return false;
264 return frame->IsMainFrame(); 264 return frame->IsMainFrame();
265 } 265 }
266 266
267 unsigned LocalDOMWindow::PendingUnloadEventListeners() const { 267 unsigned LocalDOMWindow::PendingUnloadEventListeners() const {
268 return WindowsWithUnloadEventListeners().count( 268 return WindowsWithUnloadEventListeners().count(
269 const_cast<LocalDOMWindow*>(this)); 269 const_cast<LocalDOMWindow*>(this));
270 } 270 }
271 271
272 bool LocalDOMWindow::AllowPopUp(LocalFrame& first_frame) { 272 bool LocalDOMWindow::AllowPopUp(LocalFrame& first_frame) {
273 if (UserGestureIndicator::UtilizeUserGesture()) 273 if (UserGestureIndicator::ProcessingUserGesture())
274 return true; 274 return true;
275 275
276 Settings* settings = first_frame.GetSettings(); 276 Settings* settings = first_frame.GetSettings();
277 return settings && settings->GetJavaScriptCanOpenWindowsAutomatically(); 277 return settings && settings->GetJavaScriptCanOpenWindowsAutomatically();
278 } 278 }
279 279
280 bool LocalDOMWindow::AllowPopUp() { 280 bool LocalDOMWindow::AllowPopUp() {
281 return GetFrame() && AllowPopUp(*GetFrame()); 281 return GetFrame() && AllowPopUp(*GetFrame());
282 } 282 }
283 283
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 DOMWindow::Trace(visitor); 1691 DOMWindow::Trace(visitor);
1692 Supplementable<LocalDOMWindow>::Trace(visitor); 1692 Supplementable<LocalDOMWindow>::Trace(visitor);
1693 } 1693 }
1694 1694
1695 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1695 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1696 visitor->TraceWrappers(custom_elements_); 1696 visitor->TraceWrappers(custom_elements_);
1697 DOMWindow::TraceWrappers(visitor); 1697 DOMWindow::TraceWrappers(visitor);
1698 } 1698 }
1699 1699
1700 } // namespace blink 1700 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698