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

Side by Side Diff: Source/core/page/PointerLockController.cpp

Issue 328133002: Oilpan: move Page's PointerLockController object to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « Source/core/page/PointerLockController.h ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 23 matching lines...) Expand all
34 #include "platform/PlatformMouseEvent.h" 34 #include "platform/PlatformMouseEvent.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 PointerLockController::PointerLockController(Page* page) 38 PointerLockController::PointerLockController(Page* page)
39 : m_page(page) 39 : m_page(page)
40 , m_lockPending(false) 40 , m_lockPending(false)
41 { 41 {
42 } 42 }
43 43
44 PassOwnPtr<PointerLockController> PointerLockController::create(Page* page) 44 PassOwnPtrWillBeRawPtr<PointerLockController> PointerLockController::create(Page * page)
45 { 45 {
46 return adoptPtr(new PointerLockController(page)); 46 return adoptPtrWillBeNoop(new PointerLockController(page));
47 } 47 }
48 48
49 void PointerLockController::requestPointerLock(Element* target) 49 void PointerLockController::requestPointerLock(Element* target)
50 { 50 {
51 if (!target || !target->inDocument() || m_documentOfRemovedElementWhileWaiti ngForUnlock) { 51 if (!target || !target->inDocument() || m_documentOfRemovedElementWhileWaiti ngForUnlock) {
52 enqueueEvent(EventTypeNames::pointerlockerror, target); 52 enqueueEvent(EventTypeNames::pointerlockerror, target);
53 enqueueEvent(EventTypeNames::webkitpointerlockerror, target); 53 enqueueEvent(EventTypeNames::webkitpointerlockerror, target);
54 return; 54 return;
55 } 55 }
56 56
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (element) 159 if (element)
160 enqueueEvent(type, &element->document()); 160 enqueueEvent(type, &element->document());
161 } 161 }
162 162
163 void PointerLockController::enqueueEvent(const AtomicString& type, Document* doc ument) 163 void PointerLockController::enqueueEvent(const AtomicString& type, Document* doc ument)
164 { 164 {
165 if (document && document->domWindow()) 165 if (document && document->domWindow())
166 document->domWindow()->enqueueDocumentEvent(Event::create(type)); 166 document->domWindow()->enqueueDocumentEvent(Event::create(type));
167 } 167 }
168 168
169 void PointerLockController::trace(Visitor* visitor)
170 {
171 visitor->trace(m_page);
172 visitor->trace(m_element);
173 visitor->trace(m_documentOfRemovedElementWhileWaitingForUnlock);
174 }
175
169 } // namespace WebCore 176 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/PointerLockController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698