Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: Source/core/html/CustomContextMenuProvider.h

Issue 243403006: Implement contextmenu attribute with basic support of <menu> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move to oilpan Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CustomContextMenuProvider_h
6 #define CustomContextMenuProvider_h
7
8 #include "core/page/ContextMenuProvider.h"
9 #include "platform/ContextMenuItem.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class ContextMenu;
15 class HTMLMenuElement;
16
17 class CustomContextMenuProvider FINAL : public ContextMenuProvider {
18 public:
19 static PassRefPtrWillBeRawPtr<CustomContextMenuProvider> create(HTMLMenuElem ent* menu, const Vector<ContextMenuItem>& items)
tkent 2014/07/25 04:42:38 PassRefPtrWIllBeRawPtr -> PassRefPtr because Conte
pals 2014/07/30 09:47:43 Done.
20 {
21 return adoptRefWillBeNoop(new CustomContextMenuProvider(menu, items));
tkent 2014/07/25 04:42:38 adoptRefWIllBeNoop -> adoptRef
pals 2014/07/30 09:47:43 Done.
22 }
23
24 private:
25 CustomContextMenuProvider(HTMLMenuElement* menu, const Vector<ContextMenuIte m>& items);
tkent 2014/07/25 04:42:37 The first argument should be HTMLMenuElement&.
pals 2014/07/30 09:47:43 Changed to PassRefPtr.
26
tkent 2014/07/25 04:42:37 nit: Need no blank line
pals 2014/07/30 09:47:43 Done.
27 virtual ~CustomContextMenuProvider();
28
29 virtual void populateContextMenu(ContextMenu*) OVERRIDE;
30
tkent 2014/07/25 04:42:37 nit: Need no blank line
pals 2014/07/30 09:47:43 Done.
31 virtual void contextMenuItemSelected(const ContextMenuItem*) OVERRIDE;
32
tkent 2014/07/25 04:42:37 nit: Need no blank line
pals 2014/07/30 09:47:43 Done.
33 virtual void contextMenuCleared() OVERRIDE { }
34
35 RefPtrWillBeMember<HTMLMenuElement> m_menu;
tkent 2014/07/25 04:42:38 RefPtrWillBeMember -> RefPtrWillBePersistent
pals 2014/07/30 09:47:43 Done.
36 Vector<ContextMenuItem> m_items;
37 };
38
39 } // namespace blink
40
41 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698