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

Side by Side Diff: third_party/WebKit/Source/core/page/CustomContextMenuProvider.h

Issue 2905763003: Rollback ContextMenu (Closed)
Patch Set: Delete icon-related code from ContextMenuItem class Created 3 years, 6 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 HTMLElement;
16 class HTMLMenuElement;
17 class HTMLMenuItemElement;
18
19 class CustomContextMenuProvider final : public ContextMenuProvider {
20 public:
21 ~CustomContextMenuProvider() override;
22
23 static CustomContextMenuProvider* Create(HTMLMenuElement& menu,
24 HTMLElement& subject) {
25 return new CustomContextMenuProvider(menu, subject);
26 }
27
28 DECLARE_VIRTUAL_TRACE();
29
30 private:
31 CustomContextMenuProvider(HTMLMenuElement&, HTMLElement&);
32
33 void PopulateContextMenu(ContextMenu*) override;
34 void ContextMenuItemSelected(const ContextMenuItem*) override;
35 void ContextMenuCleared() override;
36 void PopulateContextMenuItems(const HTMLMenuElement&, ContextMenu&);
37 void AppendSeparator(ContextMenu&);
38 void AppendMenuItem(HTMLMenuItemElement*, ContextMenu&);
39 HTMLElement* MenuItemAt(unsigned menu_id);
40
41 Member<HTMLMenuElement> menu_;
42 Member<HTMLElement> subject_element_;
43 HeapVector<Member<HTMLElement>> menu_items_;
44 };
45
46 } // namespace blink
47
48 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698