Index: Source/core/html/CustomContextMenuProvider.h |
diff --git a/Source/core/html/CustomContextMenuProvider.h b/Source/core/html/CustomContextMenuProvider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..da68abd57c6c9440aa4bb8a007b1e91e6e6957be |
--- /dev/null |
+++ b/Source/core/html/CustomContextMenuProvider.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CustomContextMenuProvider_h |
+#define CustomContextMenuProvider_h |
+ |
+#include "core/page/ContextMenuProvider.h" |
+#include "platform/ContextMenuItem.h" |
+#include "platform/heap/Handle.h" |
+ |
+namespace blink { |
+ |
+class ContextMenu; |
+class HTMLMenuElement; |
+ |
+class CustomContextMenuProvider FINAL : public ContextMenuProvider { |
+public: |
+ static PassRefPtrWillBeRawPtr<CustomContextMenuProvider> create(HTMLMenuElement* menu, const Vector<ContextMenuItem>& items) |
tkent
2014/07/25 04:42:38
PassRefPtrWIllBeRawPtr -> PassRefPtr
because Conte
pals
2014/07/30 09:47:43
Done.
|
+ { |
+ return adoptRefWillBeNoop(new CustomContextMenuProvider(menu, items)); |
tkent
2014/07/25 04:42:38
adoptRefWIllBeNoop -> adoptRef
pals
2014/07/30 09:47:43
Done.
|
+ } |
+ |
+private: |
+ CustomContextMenuProvider(HTMLMenuElement* menu, const Vector<ContextMenuItem>& items); |
tkent
2014/07/25 04:42:37
The first argument should be HTMLMenuElement&.
pals
2014/07/30 09:47:43
Changed to PassRefPtr.
|
+ |
tkent
2014/07/25 04:42:37
nit: Need no blank line
pals
2014/07/30 09:47:43
Done.
|
+ virtual ~CustomContextMenuProvider(); |
+ |
+ virtual void populateContextMenu(ContextMenu*) OVERRIDE; |
+ |
tkent
2014/07/25 04:42:37
nit: Need no blank line
pals
2014/07/30 09:47:43
Done.
|
+ virtual void contextMenuItemSelected(const ContextMenuItem*) OVERRIDE; |
+ |
tkent
2014/07/25 04:42:37
nit: Need no blank line
pals
2014/07/30 09:47:43
Done.
|
+ virtual void contextMenuCleared() OVERRIDE { } |
+ |
+ RefPtrWillBeMember<HTMLMenuElement> m_menu; |
tkent
2014/07/25 04:42:38
RefPtrWillBeMember -> RefPtrWillBePersistent
pals
2014/07/30 09:47:43
Done.
|
+ Vector<ContextMenuItem> m_items; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |