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

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

Issue 665763002: Oilpan: move context menu providers to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated GC_PLUGIN_IGNORE() Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/ContextMenuProvider.h ('k') | Source/core/page/CustomContextMenuProvider.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CustomContextMenuProvider_h 5 #ifndef CustomContextMenuProvider_h
6 #define CustomContextMenuProvider_h 6 #define CustomContextMenuProvider_h
7 7
8 #include "core/page/ContextMenuProvider.h" 8 #include "core/page/ContextMenuProvider.h"
9 #include "platform/ContextMenuItem.h" 9 #include "platform/ContextMenuItem.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class ContextMenu; 14 class ContextMenu;
15 class HTMLElement; 15 class HTMLElement;
16 class HTMLMenuElement; 16 class HTMLMenuElement;
17 class HTMLMenuItemElement; 17 class HTMLMenuItemElement;
18 18
19 class CustomContextMenuProvider final : public ContextMenuProvider { 19 class CustomContextMenuProvider final : public ContextMenuProvider {
20 public: 20 public:
21 static PassRefPtr<CustomContextMenuProvider> create(HTMLMenuElement& menu, H TMLElement& subject) 21 virtual ~CustomContextMenuProvider();
22
23 static PassRefPtrWillBeRawPtr<CustomContextMenuProvider> create(HTMLMenuElem ent& menu, HTMLElement& subject)
22 { 24 {
23 return adoptRef(new CustomContextMenuProvider(menu, subject)); 25 return adoptRefWillBeNoop(new CustomContextMenuProvider(menu, subject));
24 } 26 }
25 27
28 virtual void trace(Visitor*);
29
26 private: 30 private:
27 CustomContextMenuProvider(HTMLMenuElement&, HTMLElement&); 31 CustomContextMenuProvider(HTMLMenuElement&, HTMLElement&);
28 virtual ~CustomContextMenuProvider();
29 32
30 virtual void populateContextMenu(ContextMenu*) override; 33 virtual void populateContextMenu(ContextMenu*) override;
31 virtual void contextMenuItemSelected(const ContextMenuItem*) override; 34 virtual void contextMenuItemSelected(const ContextMenuItem*) override;
32 virtual void contextMenuCleared() override; 35 virtual void contextMenuCleared() override;
33 void populateContextMenuItems(const HTMLMenuElement&, ContextMenu&); 36 void populateContextMenuItems(const HTMLMenuElement&, ContextMenu&);
34 void appendSeparator(ContextMenu&); 37 void appendSeparator(ContextMenu&);
35 void appendMenuItem(HTMLMenuItemElement*, ContextMenu&); 38 void appendMenuItem(HTMLMenuItemElement*, ContextMenu&);
36 HTMLElement* menuItemAt(unsigned menuId); 39 HTMLElement* menuItemAt(unsigned menuId);
37 40
38 RefPtrWillBePersistent<HTMLMenuElement> m_menu; 41 RefPtrWillBeMember<HTMLMenuElement> m_menu;
39 RefPtrWillBePersistent<HTMLElement> m_subjectElement; 42 RefPtrWillBeMember<HTMLElement> m_subjectElement;
40 WillBePersistentHeapVector<RefPtrWillBeMember<HTMLElement> > m_menuItems; 43 WillBeHeapVector<RefPtrWillBeMember<HTMLElement> > m_menuItems;
41 }; 44 };
42 45
43 } // namespace blink 46 } // namespace blink
44 47
45 #endif 48 #endif
OLDNEW
« no previous file with comments | « Source/core/page/ContextMenuProvider.h ('k') | Source/core/page/CustomContextMenuProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698