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 22 matching lines...) Expand all Loading... | |
33 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
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 HTMLElement; | |
tkent
2014/08/05 02:33:23
This is unnecessary.
| |
44 class HTMLMenuElement; | |
tkent
2014/08/05 02:33:23
Ditto.
| |
43 class LocalFrame; | 45 class LocalFrame; |
44 class Page; | 46 class Page; |
45 | 47 |
46 class ContextMenuController : public NoBaseWillBeGarbageCollectedFinalized<C ontextMenuController> { | 48 class ContextMenuController : public NoBaseWillBeGarbageCollectedFinalized<C ontextMenuController> { |
47 WTF_MAKE_NONCOPYABLE(ContextMenuController); WTF_MAKE_FAST_ALLOCATED_WIL L_BE_REMOVED; | 49 WTF_MAKE_NONCOPYABLE(ContextMenuController); WTF_MAKE_FAST_ALLOCATED_WIL L_BE_REMOVED; |
48 public: | 50 public: |
49 static PassOwnPtrWillBeRawPtr<ContextMenuController> create(Page*, Conte xtMenuClient*); | 51 static PassOwnPtrWillBeRawPtr<ContextMenuController> create(Page*, Conte xtMenuClient*); |
50 ~ContextMenuController(); | 52 ~ContextMenuController(); |
51 void trace(Visitor*); | 53 void trace(Visitor*); |
52 | 54 |
53 ContextMenu* contextMenu() const { return m_contextMenu.get(); } | 55 ContextMenu* contextMenu() const { return m_contextMenu.get(); } |
54 void clearContextMenu(); | 56 void clearContextMenu(); |
55 | 57 |
56 void documentDetached(Document*); | 58 void documentDetached(Document*); |
57 | 59 |
58 void handleContextMenuEvent(Event*); | 60 void handleContextMenuEvent(Event*); |
59 void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>); | 61 void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>); |
60 void showContextMenuAtPoint(LocalFrame*, float x, float y, PassRefPtr<Co ntextMenuProvider>); | 62 void showContextMenuAtPoint(LocalFrame*, float x, float y, PassRefPtr<Co ntextMenuProvider>); |
61 | 63 |
62 void contextMenuItemSelected(const ContextMenuItem*); | 64 void contextMenuItemSelected(const ContextMenuItem*); |
63 | 65 |
64 const HitTestResult& hitTestResult() { return m_hitTestResult; } | 66 const HitTestResult& hitTestResult() { return m_hitTestResult; } |
65 | 67 |
66 private: | 68 private: |
67 ContextMenuController(Page*, ContextMenuClient*); | 69 ContextMenuController(Page*, ContextMenuClient*); |
68 | 70 |
69 PassOwnPtr<ContextMenu> createContextMenu(Event*); | 71 PassOwnPtr<ContextMenu> createContextMenu(Event*); |
70 PassOwnPtr<ContextMenu> createContextMenu(LocalFrame*, const LayoutPoint &); | 72 PassOwnPtr<ContextMenu> createContextMenu(LocalFrame*, const LayoutPoint &); |
73 void populateCustomContextMenu(Event*); | |
71 void showContextMenu(Event*); | 74 void showContextMenu(Event*); |
72 | 75 |
73 ContextMenuClient* m_client; | 76 ContextMenuClient* m_client; |
74 OwnPtr<ContextMenu> m_contextMenu; | 77 OwnPtr<ContextMenu> m_contextMenu; |
75 RefPtr<ContextMenuProvider> m_menuProvider; | 78 RefPtr<ContextMenuProvider> m_menuProvider; |
76 HitTestResult m_hitTestResult; | 79 HitTestResult m_hitTestResult; |
77 }; | 80 }; |
78 | 81 |
79 } | 82 } |
80 | 83 |
81 #endif | 84 #endif |
OLD | NEW |