| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); | 56 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); |
| 57 WTF_MAKE_FAST_ALLOCATED; | 57 WTF_MAKE_FAST_ALLOCATED; |
| 58 | 58 |
| 59 public: | 59 public: |
| 60 virtual ~WebPagePopupImpl(); | 60 virtual ~WebPagePopupImpl(); |
| 61 bool initialize(WebViewImpl*, PagePopupClient*, const IntRect& originBoundsI
nRootView); | 61 bool initialize(WebViewImpl*, PagePopupClient*, const IntRect& originBoundsI
nRootView); |
| 62 bool handleKeyEvent(const PlatformKeyboardEvent&); | 62 bool handleKeyEvent(const PlatformKeyboardEvent&); |
| 63 void closePopup(); | 63 void closePopup(); |
| 64 WebWidgetClient* widgetClient() const { return m_widgetClient; } | 64 WebWidgetClient* widgetClient() const { return m_widgetClient; } |
| 65 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl
ient == other->m_popupClient; } | 65 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl
ient == other->m_popupClient; } |
| 66 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) OVERRIDE; |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 // WebWidget functions | 69 // WebWidget functions |
| 69 virtual WebSize size() OVERRIDE; | 70 virtual WebSize size() OVERRIDE; |
| 70 virtual void beginFrame(const WebBeginFrameArgs&) OVERRIDE; | 71 virtual void beginFrame(const WebBeginFrameArgs&) OVERRIDE; |
| 71 virtual void layout() OVERRIDE; | 72 virtual void layout() OVERRIDE; |
| 72 virtual void willCloseLayerTreeView() OVERRIDE; | 73 virtual void willCloseLayerTreeView() OVERRIDE; |
| 73 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; | 74 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; |
| 74 virtual void resize(const WebSize&) OVERRIDE; | 75 virtual void resize(const WebSize&) OVERRIDE; |
| 75 virtual void close() OVERRIDE; | 76 virtual void close() OVERRIDE; |
| 76 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; | 77 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; |
| 77 virtual void setFocus(bool) OVERRIDE; | 78 virtual void setFocus(bool) OVERRIDE; |
| 78 virtual bool isPagePopup() const OVERRIDE { return true; } | 79 virtual bool isPagePopup() const OVERRIDE { return true; } |
| 79 virtual bool isAcceleratedCompositingActive() const OVERRIDE { return m_isAc
celeratedCompositingActive; } | 80 virtual bool isAcceleratedCompositingActive() const OVERRIDE { return m_isAc
celeratedCompositingActive; } |
| 81 virtual WebWidgetClient* client() const OVERRIDE { return m_widgetClient; } |
| 80 | 82 |
| 81 // PageWidgetEventHandler functions | 83 // PageWidgetEventHandler functions |
| 82 virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; | 84 virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; |
| 83 virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE; | 85 virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE; |
| 84 virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE; | 86 virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE; |
| 85 | 87 |
| 86 // PagePopup function | 88 // PagePopup function |
| 87 virtual AXObject* rootAXObject() OVERRIDE; | 89 virtual AXObject* rootAXObject() OVERRIDE; |
| 88 | 90 |
| 89 explicit WebPagePopupImpl(WebWidgetClient*); | 91 explicit WebPagePopupImpl(WebWidgetClient*); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 109 friend class PagePopupChromeClient; | 111 friend class PagePopupChromeClient; |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi
dget.isPagePopup()); | 114 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi
dget.isPagePopup()); |
| 113 // WebPagePopupImpl is the only implementation of PagePopup, so no | 115 // WebPagePopupImpl is the only implementation of PagePopup, so no |
| 114 // further checking required. | 116 // further checking required. |
| 115 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); | 117 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); |
| 116 | 118 |
| 117 } // namespace blink | 119 } // namespace blink |
| 118 #endif // WebPagePopupImpl_h | 120 #endif // WebPagePopupImpl_h |
| OLD | NEW |