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

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

Issue 2808953002: Revert of Followup comments from r460581. (Closed)
Patch Set: manual merge Created 3 years, 8 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
« no previous file with comments | « content/test/data/page_with_empty_beforeunload.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 1433
1434 for (auto& it : event_listener_observers_) { 1434 for (auto& it : event_listener_observers_) {
1435 it->DidAddEventListener(this, event_type); 1435 it->DidAddEventListener(this, event_type);
1436 } 1436 }
1437 1437
1438 if (event_type == EventTypeNames::unload) { 1438 if (event_type == EventTypeNames::unload) {
1439 UseCounter::Count(document(), UseCounter::kDocumentUnloadRegistered); 1439 UseCounter::Count(document(), UseCounter::kDocumentUnloadRegistered);
1440 AddUnloadEventListener(this); 1440 AddUnloadEventListener(this);
1441 } else if (event_type == EventTypeNames::beforeunload) { 1441 } else if (event_type == EventTypeNames::beforeunload) {
1442 UseCounter::Count(document(), UseCounter::kDocumentBeforeUnloadRegistered); 1442 UseCounter::Count(document(), UseCounter::kDocumentBeforeUnloadRegistered);
1443 // This is confusingly named. It doesn't actually add the listener. It
1444 // just increments a count so that we know we have listeners registered
1445 // for the purposes of determining if we can fast terminate the renderer
1446 // process.
1447 AddBeforeUnloadEventListener(this); 1443 AddBeforeUnloadEventListener(this);
1448 if (GetFrame() && !GetFrame()->IsMainFrame()) 1444 if (GetFrame() && !GetFrame()->IsMainFrame())
1449 UseCounter::Count(document(), 1445 UseCounter::Count(document(),
1450 UseCounter::kSubFrameBeforeUnloadRegistered); 1446 UseCounter::kSubFrameBeforeUnloadRegistered);
1451 } 1447 }
1452 } 1448 }
1453 1449
1454 void LocalDOMWindow::RemovedEventListener( 1450 void LocalDOMWindow::RemovedEventListener(
1455 const AtomicString& event_type, 1451 const AtomicString& event_type,
1456 const RegisteredEventListener& registered_listener) { 1452 const RegisteredEventListener& registered_listener) {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 DOMWindow::Trace(visitor); 1663 DOMWindow::Trace(visitor);
1668 Supplementable<LocalDOMWindow>::Trace(visitor); 1664 Supplementable<LocalDOMWindow>::Trace(visitor);
1669 } 1665 }
1670 1666
1671 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1667 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1672 visitor->TraceWrappers(custom_elements_); 1668 visitor->TraceWrappers(custom_elements_);
1673 DOMWindow::TraceWrappers(visitor); 1669 DOMWindow::TraceWrappers(visitor);
1674 } 1670 }
1675 1671
1676 } // namespace blink 1672 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/data/page_with_empty_beforeunload.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698