OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple 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 24 matching lines...) Expand all Loading... | |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class ContextMenu; | 37 class ContextMenu; |
38 class ContextMenuClient; | 38 class ContextMenuClient; |
39 class ContextMenuItem; | 39 class ContextMenuItem; |
40 class ContextMenuProvider; | 40 class ContextMenuProvider; |
41 class Document; | 41 class Document; |
42 class Event; | 42 class Event; |
43 class Page; | 43 class Page; |
44 | 44 |
45 class ContextMenuController { | 45 class ContextMenuController : public NoBaseWillBeGarbageCollectedFinalized<C ontextMenuController> { |
zerny-chromium
2014/06/18 05:33:05
Nit: FINAL
| |
46 WTF_MAKE_NONCOPYABLE(ContextMenuController); WTF_MAKE_FAST_ALLOCATED; | 46 WTF_MAKE_NONCOPYABLE(ContextMenuController); WTF_MAKE_FAST_ALLOCATED_WIL L_BE_REMOVED; |
47 public: | 47 public: |
48 static PassOwnPtrWillBeRawPtr<ContextMenuController> create(Page*, Conte xtMenuClient*); | |
48 ~ContextMenuController(); | 49 ~ContextMenuController(); |
49 | 50 void trace(Visitor*); |
50 static PassOwnPtr<ContextMenuController> create(Page*, ContextMenuClient *); | |
51 | 51 |
52 ContextMenu* contextMenu() const { return m_contextMenu.get(); } | 52 ContextMenu* contextMenu() const { return m_contextMenu.get(); } |
53 void clearContextMenu(); | 53 void clearContextMenu(); |
54 | 54 |
55 void documentDetached(Document*); | 55 void documentDetached(Document*); |
56 | 56 |
57 void handleContextMenuEvent(Event*); | 57 void handleContextMenuEvent(Event*); |
58 void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>); | 58 void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>); |
59 | 59 |
60 void contextMenuItemSelected(const ContextMenuItem*); | 60 void contextMenuItemSelected(const ContextMenuItem*); |
61 | 61 |
62 const HitTestResult& hitTestResult() { return m_hitTestResult; } | 62 const HitTestResult& hitTestResult() { return m_hitTestResult; } |
63 | 63 |
64 private: | 64 private: |
65 ContextMenuController(Page*, ContextMenuClient*); | 65 ContextMenuController(Page*, ContextMenuClient*); |
66 | 66 |
67 PassOwnPtr<ContextMenu> createContextMenu(Event*); | 67 PassOwnPtr<ContextMenu> createContextMenu(Event*); |
68 void showContextMenu(Event*); | 68 void showContextMenu(Event*); |
69 | 69 |
70 ContextMenuClient* m_client; | 70 ContextMenuClient* m_client; |
71 OwnPtr<ContextMenu> m_contextMenu; | 71 OwnPtr<ContextMenu> m_contextMenu; |
72 RefPtr<ContextMenuProvider> m_menuProvider; | 72 RefPtr<ContextMenuProvider> m_menuProvider; |
73 HitTestResult m_hitTestResult; | 73 HitTestResult m_hitTestResult; |
74 }; | 74 }; |
75 | 75 |
76 } | 76 } |
77 | 77 |
78 #endif | 78 #endif |
OLD | NEW |