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

Side by Side Diff: Source/platform/PopupMenuClient.h

Issue 736883002: Implement <select> Popup Menu using PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 11 matching lines...) Expand all
22 #ifndef PopupMenuClient_h 22 #ifndef PopupMenuClient_h
23 #define PopupMenuClient_h 23 #define PopupMenuClient_h
24 24
25 #include "platform/LayoutUnit.h" 25 #include "platform/LayoutUnit.h"
26 #include "platform/PlatformExport.h" 26 #include "platform/PlatformExport.h"
27 #include "platform/PopupMenuStyle.h" 27 #include "platform/PopupMenuStyle.h"
28 #include "wtf/Forward.h" 28 #include "wtf/Forward.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class HTMLElement;
33 class RenderStyle;
34
32 class PopupMenuClient { 35 class PopupMenuClient {
33 public: 36 public:
34 virtual ~PopupMenuClient() { } 37 virtual ~PopupMenuClient() { }
35 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) = 0; 38 virtual void valueChanged(unsigned listIndex, bool fireEvents = true) = 0;
36 virtual void selectionChanged(unsigned listIndex, bool fireEvents = true) = 0; 39 virtual void selectionChanged(unsigned listIndex, bool fireEvents = true) = 0;
37 virtual void selectionCleared() = 0; 40 virtual void selectionCleared() = 0;
38 41
39 virtual String itemText(unsigned listIndex) const = 0; 42 virtual String itemText(unsigned listIndex) const = 0;
40 virtual String itemToolTip(unsigned listIndex) const = 0; 43 virtual String itemToolTip(unsigned listIndex) const = 0;
41 virtual String itemAccessibilityText(unsigned listIndex) const = 0; 44 virtual String itemAccessibilityText(unsigned listIndex) const = 0;
42 virtual bool itemIsEnabled(unsigned listIndex) const = 0; 45 virtual bool itemIsEnabled(unsigned listIndex) const = 0;
43 virtual PopupMenuStyle itemStyle(unsigned listIndex) const = 0; 46 virtual PopupMenuStyle itemStyle(unsigned listIndex) const = 0;
44 virtual PopupMenuStyle menuStyle() const = 0; 47 virtual PopupMenuStyle menuStyle() const = 0;
45 virtual LayoutUnit clientPaddingLeft() const = 0; 48 virtual LayoutUnit clientPaddingLeft() const = 0;
46 virtual LayoutUnit clientPaddingRight() const = 0; 49 virtual LayoutUnit clientPaddingRight() const = 0;
47 virtual int listSize() const = 0; 50 virtual int listSize() const = 0;
48 virtual int selectedIndex() const = 0; 51 virtual int selectedIndex() const = 0;
49 virtual void popupDidHide() = 0; 52 virtual void popupDidHide() = 0;
50 virtual bool itemIsSeparator(unsigned listIndex) const = 0; 53 virtual bool itemIsSeparator(unsigned listIndex) const = 0;
51 virtual bool itemIsLabel(unsigned listIndex) const = 0; 54 virtual bool itemIsLabel(unsigned listIndex) const = 0;
52 virtual bool itemIsSelected(unsigned listIndex) const = 0; 55 virtual bool itemIsSelected(unsigned listIndex) const = 0;
53 virtual void setTextFromItem(unsigned listIndex) = 0; 56 virtual void setTextFromItem(unsigned listIndex) = 0;
57 virtual IntRect elementRectRelativeToRootView() const = 0;
58 virtual Element& ownerElement() const = 0;
tkent 2014/12/15 02:10:52 Layering violation. platform/* can't depend on co
keishi 2014/12/15 08:29:42 Done.
59 virtual RenderStyle* renderStyleForItem(HTMLElement&) const = 0;
54 60
55 virtual void listBoxSelectItem(int /*listIndex*/, bool /*allowMultiplySelect ions*/, bool /*shift*/, bool /*fireOnChangeNow*/ = true) { ASSERT_NOT_REACHED(); } 61 virtual void listBoxSelectItem(int /*listIndex*/, bool /*allowMultiplySelect ions*/, bool /*shift*/, bool /*fireOnChangeNow*/ = true) { ASSERT_NOT_REACHED(); }
56 virtual bool multiple() const 62 virtual bool multiple() const
57 { 63 {
58 ASSERT_NOT_REACHED(); 64 ASSERT_NOT_REACHED();
59 return false; 65 return false;
60 } 66 }
61 }; 67 };
62 68
63 } 69 }
64 70
65 #endif 71 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698