| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class GraphicsLayer; | 42 class GraphicsLayer; |
| 43 class Page; | 43 class Page; |
| 44 class PagePopupChromeClient; | 44 class PagePopupChromeClient; |
| 45 class PagePopupClient; | 45 class PagePopupClient; |
| 46 class PlatformKeyboardEvent; | 46 class PlatformKeyboardEvent; |
| 47 class WebLayerTreeView; | 47 class WebLayerTreeView; |
| 48 class WebLayer; | 48 class WebLayer; |
| 49 class WebViewImpl; | 49 class WebViewImpl; |
| 50 class LocalDOMWindow; | 50 class LocalDOMWindow; |
| 51 | 51 |
| 52 class WebPagePopupImpl FINAL | 52 class WebPagePopupImpl final |
| 53 : public WebPagePopup | 53 : public WebPagePopup |
| 54 , public PageWidgetEventHandler | 54 , public PageWidgetEventHandler |
| 55 , public PagePopup | 55 , public PagePopup |
| 56 , public RefCounted<WebPagePopupImpl> { | 56 , public RefCounted<WebPagePopupImpl> { |
| 57 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); | 57 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); |
| 58 WTF_MAKE_FAST_ALLOCATED; | 58 WTF_MAKE_FAST_ALLOCATED; |
| 59 | 59 |
| 60 public: | 60 public: |
| 61 virtual ~WebPagePopupImpl(); | 61 virtual ~WebPagePopupImpl(); |
| 62 bool initialize(WebViewImpl*, PagePopupClient*, const IntRect& originBoundsI
nRootView); | 62 bool initialize(WebViewImpl*, PagePopupClient*, const IntRect& originBoundsI
nRootView); |
| 63 bool handleKeyEvent(const PlatformKeyboardEvent&); | 63 bool handleKeyEvent(const PlatformKeyboardEvent&); |
| 64 void closePopup(); | 64 void closePopup(); |
| 65 WebWidgetClient* widgetClient() const { return m_widgetClient; } | 65 WebWidgetClient* widgetClient() const { return m_widgetClient; } |
| 66 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl
ient == other->m_popupClient; } | 66 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl
ient == other->m_popupClient; } |
| 67 LocalDOMWindow* window(); | 67 LocalDOMWindow* window(); |
| 68 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) OVERRIDE; | 68 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*
) override; |
| 69 virtual WebPoint positionRelativeToOwner() OVERRIDE; | 69 virtual WebPoint positionRelativeToOwner() override; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 // WebWidget functions | 72 // WebWidget functions |
| 73 virtual WebSize size() OVERRIDE; | 73 virtual WebSize size() override; |
| 74 virtual void beginFrame(const WebBeginFrameArgs&) OVERRIDE; | 74 virtual void beginFrame(const WebBeginFrameArgs&) override; |
| 75 virtual void layout() OVERRIDE; | 75 virtual void layout() override; |
| 76 virtual void willCloseLayerTreeView() OVERRIDE; | 76 virtual void willCloseLayerTreeView() override; |
| 77 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; | 77 virtual void paint(WebCanvas*, const WebRect&) override; |
| 78 virtual void resize(const WebSize&) OVERRIDE; | 78 virtual void resize(const WebSize&) override; |
| 79 virtual void close() OVERRIDE; | 79 virtual void close() override; |
| 80 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; | 80 virtual bool handleInputEvent(const WebInputEvent&) override; |
| 81 virtual void setFocus(bool) OVERRIDE; | 81 virtual void setFocus(bool) override; |
| 82 virtual bool isPagePopup() const OVERRIDE { return true; } | 82 virtual bool isPagePopup() const override { return true; } |
| 83 virtual bool isAcceleratedCompositingActive() const OVERRIDE { return m_isAc
celeratedCompositingActive; } | 83 virtual bool isAcceleratedCompositingActive() const override { return m_isAc
celeratedCompositingActive; } |
| 84 | 84 |
| 85 // PageWidgetEventHandler functions | 85 // PageWidgetEventHandler functions |
| 86 virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; | 86 virtual bool handleKeyEvent(const WebKeyboardEvent&) override; |
| 87 virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE; | 87 virtual bool handleCharEvent(const WebKeyboardEvent&) override; |
| 88 virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE; | 88 virtual bool handleGestureEvent(const WebGestureEvent&) override; |
| 89 | 89 |
| 90 // PagePopup function | 90 // PagePopup function |
| 91 virtual AXObject* rootAXObject() OVERRIDE; | 91 virtual AXObject* rootAXObject() override; |
| 92 | 92 |
| 93 explicit WebPagePopupImpl(WebWidgetClient*); | 93 explicit WebPagePopupImpl(WebWidgetClient*); |
| 94 bool initializePage(); | 94 bool initializePage(); |
| 95 void destroyPage(); | 95 void destroyPage(); |
| 96 void setRootGraphicsLayer(GraphicsLayer*); | 96 void setRootGraphicsLayer(GraphicsLayer*); |
| 97 void setIsAcceleratedCompositingActive(bool enter); | 97 void setIsAcceleratedCompositingActive(bool enter); |
| 98 | 98 |
| 99 WebWidgetClient* m_widgetClient; | 99 WebWidgetClient* m_widgetClient; |
| 100 WebRect m_windowRectInScreen; | 100 WebRect m_windowRectInScreen; |
| 101 WebViewImpl* m_webView; | 101 WebViewImpl* m_webView; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 113 friend class PagePopupChromeClient; | 113 friend class PagePopupChromeClient; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi
dget.isPagePopup()); | 116 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi
dget.isPagePopup()); |
| 117 // WebPagePopupImpl is the only implementation of PagePopup, so no | 117 // WebPagePopupImpl is the only implementation of PagePopup, so no |
| 118 // further checking required. | 118 // further checking required. |
| 119 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); | 119 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); |
| 120 | 120 |
| 121 } // namespace blink | 121 } // namespace blink |
| 122 #endif // WebPagePopupImpl_h | 122 #endif // WebPagePopupImpl_h |
| OLD | NEW |