Index: Source/core/page/CustomContextMenuProvider.h |
diff --git a/Source/core/page/CustomContextMenuProvider.h b/Source/core/page/CustomContextMenuProvider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c0a6277b93c123972b1933a482a7ef64067667f3 |
--- /dev/null |
+++ b/Source/core/page/CustomContextMenuProvider.h |
@@ -0,0 +1,38 @@ |
+// 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 Document; |
+ |
+class CustomContextMenuProvider FINAL : public ContextMenuProvider { |
+public: |
+ static PassRefPtr<CustomContextMenuProvider> create(PassRefPtr<Document> document, const Vector<ContextMenuItem>& items) |
tkent
2014/07/31 06:07:56
PassRefPtr<Document> -> Document&
pals
2014/08/01 10:03:08
Done.
|
+ { |
+ return adoptRef(new CustomContextMenuProvider(document, items)); |
+ } |
+ |
+private: |
+ CustomContextMenuProvider(PassRefPtr<Document>, const Vector<ContextMenuItem>& items); |
tkent
2014/07/31 06:07:56
Ditto.
pals
2014/08/01 10:03:08
Done.
|
+ virtual ~CustomContextMenuProvider(); |
+ |
+ virtual void populateContextMenu(ContextMenu*) OVERRIDE; |
+ virtual void contextMenuItemSelected(const ContextMenuItem*) OVERRIDE; |
+ virtual void contextMenuCleared() OVERRIDE { } |
+ |
+ RefPtrWillBePersistent<Document> m_document; |
+ Vector<ContextMenuItem> m_items; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |