| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef MockPagePopupDriver_h | 26 #ifndef MockPagePopupDriver_h |
| 27 #define MockPagePopupDriver_h | 27 #define MockPagePopupDriver_h |
| 28 | 28 |
| 29 #include "core/page/PagePopupClient.h" | 29 #include "core/page/PagePopupClient.h" |
| 30 #include "core/page/PagePopupDriver.h" | 30 #include "core/page/PagePopupDriver.h" |
| 31 #include <wtf/RefPtr.h> | 31 #include <wtf/RefPtr.h> |
| 32 | 32 |
| 33 #if ENABLE(PAGE_POPUP) | |
| 34 namespace WebCore { | 33 namespace WebCore { |
| 35 | 34 |
| 36 class Frame; | 35 class Frame; |
| 37 class IntRect; | 36 class IntRect; |
| 38 class MockPagePopup; | 37 class MockPagePopup; |
| 39 class PagePopup; | 38 class PagePopup; |
| 40 class PagePopupController; | 39 class PagePopupController; |
| 41 | 40 |
| 42 class MockPagePopupDriver : public PagePopupDriver { | 41 class MockPagePopupDriver : public PagePopupDriver { |
| 43 public: | 42 public: |
| 44 static PassOwnPtr<MockPagePopupDriver> create(Frame* mainFrame); | 43 static PassOwnPtr<MockPagePopupDriver> create(Frame* mainFrame); |
| 45 virtual ~MockPagePopupDriver(); | 44 virtual ~MockPagePopupDriver(); |
| 46 PagePopupController* pagePopupController() { return m_pagePopupController.ge
t(); } | 45 PagePopupController* pagePopupController() { return m_pagePopupController.ge
t(); } |
| 47 | 46 |
| 48 private: | 47 private: |
| 49 MockPagePopupDriver(Frame* mainFrame); | 48 MockPagePopupDriver(Frame* mainFrame); |
| 50 | 49 |
| 51 // PagePopupDriver functions: | 50 // PagePopupDriver functions: |
| 52 virtual PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoun
dsInRootView) OVERRIDE; | 51 virtual PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoun
dsInRootView) OVERRIDE; |
| 53 virtual void closePagePopup(PagePopup*) OVERRIDE; | 52 virtual void closePagePopup(PagePopup*) OVERRIDE; |
| 54 | 53 |
| 55 RefPtr<MockPagePopup> m_mockPagePopup; | 54 RefPtr<MockPagePopup> m_mockPagePopup; |
| 56 Frame* m_mainFrame; | 55 Frame* m_mainFrame; |
| 57 RefPtr<PagePopupController> m_pagePopupController; | 56 RefPtr<PagePopupController> m_pagePopupController; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } | 59 } |
| 61 #endif | 60 #endif |
| 62 #endif | |
| OLD | NEW |