| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 class ContextMenu; | 39 class ContextMenu; |
| 40 class ContextMenuClient; | 40 class ContextMenuClient; |
| 41 class ContextMenuItem; | 41 class ContextMenuItem; |
| 42 class ContextMenuProvider; | 42 class ContextMenuProvider; |
| 43 class Document; | 43 class Document; |
| 44 class Event; | 44 class Event; |
| 45 class LocalFrame; | 45 class LocalFrame; |
| 46 class Page; | 46 class Page; |
| 47 | 47 |
| 48 class CORE_EXPORT ContextMenuController final : public NoBaseWillBeGarbageCollec
tedFinalized<ContextMenuController> { | 48 class CORE_EXPORT ContextMenuController final : public GarbageCollectedFinalized
<ContextMenuController> { |
| 49 WTF_MAKE_NONCOPYABLE(ContextMenuController); USING_FAST_MALLOC_WILL_BE_REMOV
ED(ContextMenuController); | 49 WTF_MAKE_NONCOPYABLE(ContextMenuController); |
| 50 public: | 50 public: |
| 51 static PassOwnPtrWillBeRawPtr<ContextMenuController> create(Page*, ContextMe
nuClient*); | 51 static RawPtr<ContextMenuController> create(Page*, ContextMenuClient*); |
| 52 ~ContextMenuController(); | 52 ~ContextMenuController(); |
| 53 DECLARE_TRACE(); | 53 DECLARE_TRACE(); |
| 54 | 54 |
| 55 ContextMenu* contextMenu() const { return m_contextMenu.get(); } | 55 ContextMenu* contextMenu() const { return m_contextMenu.get(); } |
| 56 void clearContextMenu(); | 56 void clearContextMenu(); |
| 57 | 57 |
| 58 void documentDetached(Document*); | 58 void documentDetached(Document*); |
| 59 | 59 |
| 60 void handleContextMenuEvent(Event*); | 60 void handleContextMenuEvent(Event*); |
| 61 void showContextMenu(Event*, PassRefPtrWillBeRawPtr<ContextMenuProvider>); | 61 void showContextMenu(Event*, RawPtr<ContextMenuProvider>); |
| 62 void showContextMenuAtPoint(LocalFrame*, float x, float y, PassRefPtrWillBeR
awPtr<ContextMenuProvider>); | 62 void showContextMenuAtPoint(LocalFrame*, float x, float y, RawPtr<ContextMen
uProvider>); |
| 63 | 63 |
| 64 void contextMenuItemSelected(const ContextMenuItem*); | 64 void contextMenuItemSelected(const ContextMenuItem*); |
| 65 | 65 |
| 66 const HitTestResult& hitTestResult() { return m_hitTestResult; } | 66 const HitTestResult& hitTestResult() { return m_hitTestResult; } |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 ContextMenuController(Page*, ContextMenuClient*); | 69 ContextMenuController(Page*, ContextMenuClient*); |
| 70 | 70 |
| 71 PassOwnPtr<ContextMenu> createContextMenu(Event*); | 71 PassOwnPtr<ContextMenu> createContextMenu(Event*); |
| 72 PassOwnPtr<ContextMenu> createContextMenu(LocalFrame*, const LayoutPoint&); | 72 PassOwnPtr<ContextMenu> createContextMenu(LocalFrame*, const LayoutPoint&); |
| 73 void populateCustomContextMenu(const Event&); | 73 void populateCustomContextMenu(const Event&); |
| 74 void showContextMenu(Event*); | 74 void showContextMenu(Event*); |
| 75 | 75 |
| 76 ContextMenuClient* m_client; | 76 ContextMenuClient* m_client; |
| 77 OwnPtr<ContextMenu> m_contextMenu; | 77 OwnPtr<ContextMenu> m_contextMenu; |
| 78 RefPtrWillBeMember<ContextMenuProvider> m_menuProvider; | 78 Member<ContextMenuProvider> m_menuProvider; |
| 79 HitTestResult m_hitTestResult; | 79 HitTestResult m_hitTestResult; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| 83 | 83 |
| 84 #endif // ContextMenuController_h | 84 #endif // ContextMenuController_h |
| OLD | NEW |