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

Side by Side Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2379923002: Implement "appinstalled" event on Android. (Closed)
Patch Set: Minor refactor. 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 void EventTarget::addedEventListener( 311 void EventTarget::addedEventListener(
312 const AtomicString& eventType, 312 const AtomicString& eventType,
313 RegisteredEventListener& registeredListener) { 313 RegisteredEventListener& registeredListener) {
314 if (eventType == EventTypeNames::auxclick) { 314 if (eventType == EventTypeNames::auxclick) {
315 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 315 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
316 UseCounter::count(executingWindow->document(), 316 UseCounter::count(executingWindow->document(),
317 UseCounter::AuxclickAddListenerCount); 317 UseCounter::AuxclickAddListenerCount);
318 } 318 }
319 } else if (eventType == EventTypeNames::appinstalled) {
320 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
321 UseCounter::count(executingWindow->document(),
322 UseCounter::AppInstalledEventAddListener);
323 }
319 } else if (EventUtil::isPointerEventType(eventType)) { 324 } else if (EventUtil::isPointerEventType(eventType)) {
320 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 325 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
321 UseCounter::count(executingWindow->document(), 326 UseCounter::count(executingWindow->document(),
322 UseCounter::PointerEventAddListenerCount); 327 UseCounter::PointerEventAddListenerCount);
323 } 328 }
324 } else if (eventType == EventTypeNames::slotchange) { 329 } else if (eventType == EventTypeNames::slotchange) {
325 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 330 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
326 UseCounter::count(executingWindow->document(), 331 UseCounter::count(executingWindow->document(),
327 UseCounter::SlotChangeEventAddListener); 332 UseCounter::SlotChangeEventAddListener);
328 } 333 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 // they have one less listener to invoke. 764 // they have one less listener to invoke.
760 if (d->firingEventIterators) { 765 if (d->firingEventIterators) {
761 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 766 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
762 d->firingEventIterators->at(i).iterator = 0; 767 d->firingEventIterators->at(i).iterator = 0;
763 d->firingEventIterators->at(i).end = 0; 768 d->firingEventIterators->at(i).end = 0;
764 } 769 }
765 } 770 }
766 } 771 }
767 772
768 } // namespace blink 773 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698