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 30 matching lines...) Expand all Loading... |
41 class Page; | 41 class Page; |
42 class PagePopupClient; | 42 class PagePopupClient; |
43 class PlatformKeyboardEvent; | 43 class PlatformKeyboardEvent; |
44 } | 44 } |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 class PagePopupChromeClient; | 48 class PagePopupChromeClient; |
49 class WebViewImpl; | 49 class WebViewImpl; |
50 | 50 |
51 class WebPagePopupImpl : public WebPagePopup, | 51 class WebPagePopupImpl FINAL : |
52 public PageWidgetEventHandler, | 52 public WebPagePopup, |
53 public WebCore::PagePopup, | 53 public PageWidgetEventHandler, |
54 public RefCounted<WebPagePopupImpl> { | 54 public WebCore::PagePopup, |
| 55 public RefCounted<WebPagePopupImpl> { |
55 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); | 56 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); |
56 WTF_MAKE_FAST_ALLOCATED; | 57 WTF_MAKE_FAST_ALLOCATED; |
57 | 58 |
58 public: | 59 public: |
59 virtual ~WebPagePopupImpl(); | 60 virtual ~WebPagePopupImpl(); |
60 bool initialize(WebViewImpl*, WebCore::PagePopupClient*, const WebCore::IntR
ect& originBoundsInRootView); | 61 bool initialize(WebViewImpl*, WebCore::PagePopupClient*, const WebCore::IntR
ect& originBoundsInRootView); |
61 bool handleKeyEvent(const WebCore::PlatformKeyboardEvent&); | 62 bool handleKeyEvent(const WebCore::PlatformKeyboardEvent&); |
62 void closePopup(); | 63 void closePopup(); |
63 WebWidgetClient* widgetClient() const { return m_widgetClient; } | 64 WebWidgetClient* widgetClient() const { return m_widgetClient; } |
64 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; } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 friend class PagePopupChromeClient; | 97 friend class PagePopupChromeClient; |
97 }; | 98 }; |
98 | 99 |
99 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi
dget.isPagePopup()); | 100 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi
dget.isPagePopup()); |
100 // WebPagePopupImpl is the only implementation of WebCore::PagePopup, so no | 101 // WebPagePopupImpl is the only implementation of WebCore::PagePopup, so no |
101 // further checking required. | 102 // further checking required. |
102 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebCore::PagePopup, popup, true, true); | 103 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebCore::PagePopup, popup, true, true); |
103 | 104 |
104 } // namespace blink | 105 } // namespace blink |
105 #endif // WebPagePopupImpl_h | 106 #endif // WebPagePopupImpl_h |
OLD | NEW |