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

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

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/Page.cpp ('k') | Source/core/page/PointerLockController.cpp » ('j') | 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 19 matching lines...) Expand all
30 #include "wtf/text/AtomicString.h" 30 #include "wtf/text/AtomicString.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class Element; 34 class Element;
35 class Document; 35 class Document;
36 class Page; 36 class Page;
37 class PlatformMouseEvent; 37 class PlatformMouseEvent;
38 class VoidCallback; 38 class VoidCallback;
39 39
40 class PointerLockController { 40 class PointerLockController FINAL : public NoBaseWillBeGarbageCollected<PointerL ockController> {
41 WTF_MAKE_NONCOPYABLE(PointerLockController); 41 WTF_MAKE_NONCOPYABLE(PointerLockController);
42 WTF_MAKE_FAST_ALLOCATED; 42 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
43 public: 43 public:
44 static PassOwnPtr<PointerLockController> create(Page*); 44 static PassOwnPtrWillBeRawPtr<PointerLockController> create(Page*);
45 45
46 void requestPointerLock(Element* target); 46 void requestPointerLock(Element* target);
47 void requestPointerUnlock(); 47 void requestPointerUnlock();
48 void elementRemoved(Element*); 48 void elementRemoved(Element*);
49 void documentDetached(Document*); 49 void documentDetached(Document*);
50 bool lockPending() const; 50 bool lockPending() const;
51 Element* element() const; 51 Element* element() const;
52 52
53 void didAcquirePointerLock(); 53 void didAcquirePointerLock();
54 void didNotAcquirePointerLock(); 54 void didNotAcquirePointerLock();
55 void didLosePointerLock(); 55 void didLosePointerLock();
56 void dispatchLockedMouseEvent(const PlatformMouseEvent&, const AtomicString& eventType); 56 void dispatchLockedMouseEvent(const PlatformMouseEvent&, const AtomicString& eventType);
57 57
58 void trace(Visitor*);
59
58 private: 60 private:
59 explicit PointerLockController(Page*); 61 explicit PointerLockController(Page*);
60 void clearElement(); 62 void clearElement();
61 void enqueueEvent(const AtomicString& type, Element*); 63 void enqueueEvent(const AtomicString& type, Element*);
62 void enqueueEvent(const AtomicString& type, Document*); 64 void enqueueEvent(const AtomicString& type, Document*);
63 65
64 Page* m_page; 66 RawPtrWillBeMember<Page> m_page;
65 bool m_lockPending; 67 bool m_lockPending;
66 RefPtrWillBePersistent<Element> m_element; 68 RefPtrWillBeMember<Element> m_element;
67 RefPtrWillBePersistent<Document> m_documentOfRemovedElementWhileWaitingForUn lock; 69 RefPtrWillBeMember<Document> m_documentOfRemovedElementWhileWaitingForUnlock ;
68 }; 70 };
69 71
70 } // namespace WebCore 72 } // namespace WebCore
71 73
72 #endif // PointerLockController_h 74 #endif // PointerLockController_h
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/page/PointerLockController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698