OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class Page; | 44 class Page; |
45 class PlatformKeyboardEvent; | 45 class PlatformKeyboardEvent; |
46 class Range; | 46 class Range; |
47 class Widget; | 47 class Widget; |
48 } | 48 } |
49 | 49 |
50 namespace WebKit { | 50 namespace WebKit { |
51 class WebKeyboardEvent; | 51 class WebKeyboardEvent; |
52 class WebMouseEvent; | 52 class WebMouseEvent; |
53 class WebMouseWheelEvent; | 53 class WebMouseWheelEvent; |
| 54 class WebRange; |
54 struct WebRect; | 55 struct WebRect; |
55 | 56 |
56 class WebPopupMenuImpl : public WebPopupMenu, | 57 class WebPopupMenuImpl : public WebPopupMenu, |
57 public WebCore::FramelessScrollViewClient, | 58 public WebCore::FramelessScrollViewClient, |
58 public RefCounted<WebPopupMenuImpl> { | 59 public RefCounted<WebPopupMenuImpl> { |
59 WTF_MAKE_FAST_ALLOCATED; | 60 WTF_MAKE_FAST_ALLOCATED; |
60 public: | 61 public: |
61 // WebWidget | 62 // WebWidget |
62 virtual void close(); | 63 virtual void close(); |
63 virtual WebSize size() { return m_size; } | 64 virtual WebSize size() { return m_size; } |
64 virtual void resize(const WebSize&); | 65 virtual void resize(const WebSize&); |
65 virtual void animate(); | 66 virtual void animate(); |
66 virtual void layout(); | 67 virtual void layout(); |
67 virtual void paint(WebCanvas* canvas, const WebRect& rect); | 68 virtual void paint(WebCanvas* canvas, const WebRect& rect); |
68 virtual void themeChanged(); | 69 virtual void themeChanged(); |
69 virtual void composite(bool finish); | 70 virtual void composite(bool finish); |
70 virtual bool handleInputEvent(const WebInputEvent&); | 71 virtual bool handleInputEvent(const WebInputEvent&); |
71 virtual void mouseCaptureLost(); | 72 virtual void mouseCaptureLost(); |
72 virtual void setFocus(bool enable); | 73 virtual void setFocus(bool enable); |
73 virtual bool setComposition( | 74 virtual bool setComposition( |
74 const WebString& text, | 75 const WebString& text, |
75 const WebVector<WebCompositionUnderline>& underlines, | 76 const WebVector<WebCompositionUnderline>& underlines, |
76 int selectionStart, int selectionEnd); | 77 int selectionStart, int selectionEnd); |
77 virtual bool confirmComposition(); | 78 virtual bool confirmComposition(); |
78 virtual bool confirmComposition(const WebString& text); | 79 virtual bool confirmComposition(const WebString& text); |
| 80 virtual WebRange compositionRange(); |
79 virtual WebTextInputType textInputType(); | 81 virtual WebTextInputType textInputType(); |
80 virtual WebRect caretOrSelectionBounds(); | 82 virtual WebRect caretOrSelectionBounds(); |
| 83 virtual WebRange caretOrSelectionRange(); |
81 virtual void setTextDirection(WebTextDirection direction); | 84 virtual void setTextDirection(WebTextDirection direction); |
82 virtual bool isAcceleratedCompositingActive() const { return false; } | 85 virtual bool isAcceleratedCompositingActive() const { return false; } |
83 | 86 |
84 // WebPopupMenuImpl | 87 // WebPopupMenuImpl |
85 void Init(WebCore::FramelessScrollView* widget, | 88 void Init(WebCore::FramelessScrollView* widget, |
86 const WebRect& bounds); | 89 const WebRect& bounds); |
87 | 90 |
88 WebWidgetClient* client() { return m_client; } | 91 WebWidgetClient* client() { return m_client; } |
89 | 92 |
90 void MouseMove(const WebMouseEvent&); | 93 void MouseMove(const WebMouseEvent&); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 WebPoint m_lastMousePosition; | 130 WebPoint m_lastMousePosition; |
128 | 131 |
129 // This is a non-owning ref. The popup will notify us via popupClosed() | 132 // This is a non-owning ref. The popup will notify us via popupClosed() |
130 // before it is destroyed. | 133 // before it is destroyed. |
131 WebCore::FramelessScrollView* m_widget; | 134 WebCore::FramelessScrollView* m_widget; |
132 }; | 135 }; |
133 | 136 |
134 } // namespace WebKit | 137 } // namespace WebKit |
135 | 138 |
136 #endif | 139 #endif |
OLD | NEW |