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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class GestureEvent; | 46 class GestureEvent; |
47 class HTMLPlugInElement; | 47 class HTMLPlugInElement; |
48 class IntRect; | 48 class IntRect; |
49 class KeyboardEvent; | 49 class KeyboardEvent; |
50 class MouseEvent; | 50 class MouseEvent; |
51 class PlatformGestureEvent; | 51 class PlatformGestureEvent; |
52 class ResourceError; | 52 class ResourceError; |
53 class ResourceResponse; | 53 class ResourceResponse; |
54 class TouchEvent; | 54 class TouchEvent; |
55 class WheelEvent; | 55 class WheelEvent; |
| 56 class Widget; |
56 } | 57 } |
57 | 58 |
58 namespace WebKit { | 59 namespace WebKit { |
59 | 60 |
60 struct WebPrintParams; | 61 struct WebPrintParams; |
61 | 62 |
62 class ScrollbarGroup; | 63 class ScrollbarGroup; |
63 class WebPlugin; | 64 class WebPlugin; |
64 class WebPluginLoadObserver; | 65 class WebPluginLoadObserver; |
65 class WebExternalTextureLayer; | 66 class WebExternalTextureLayer; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 WebLayer* m_webLayer; | 191 WebLayer* m_webLayer; |
191 | 192 |
192 // The associated scrollbar group object, created lazily. Used for Pepper | 193 // The associated scrollbar group object, created lazily. Used for Pepper |
193 // scrollbars. | 194 // scrollbars. |
194 OwnPtr<ScrollbarGroup> m_scrollbarGroup; | 195 OwnPtr<ScrollbarGroup> m_scrollbarGroup; |
195 | 196 |
196 TouchEventRequestType m_touchEventRequestType; | 197 TouchEventRequestType m_touchEventRequestType; |
197 bool m_wantsWheelEvents; | 198 bool m_wantsWheelEvents; |
198 }; | 199 }; |
199 | 200 |
| 201 inline WebPluginContainerImpl* toPluginContainerImpl(WebCore::Widget* widget) |
| 202 { |
| 203 ASSERT_WITH_SECURITY_IMPLICATION(!widget || widget->isPluginContainer()); |
| 204 // We need to ensure that the object is actually of type PluginContainer |
| 205 // as there are many subclasses of Widget. |
| 206 return static_cast<WebPluginContainerImpl*>(widget); |
| 207 } |
| 208 |
| 209 inline WebPluginContainerImpl* toPluginContainerImpl(WebPluginContainer* contain
er) |
| 210 { |
| 211 // Unlike Widget, we need not worry about object type for container. |
| 212 // WebPluginContainerImpl is the only subclass of WebPluginContainer. |
| 213 return static_cast<WebPluginContainerImpl*>(container); |
| 214 } |
| 215 |
| 216 // This will catch anyone doing an unnecessary cast. |
| 217 void toPluginContainerImpl(const WebPluginContainerImpl*); |
| 218 |
200 } // namespace WebKit | 219 } // namespace WebKit |
201 | 220 |
202 #endif | 221 #endif |
OLD | NEW |