| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static PassRefPtr<MockPagePopup> create(PagePopupClient*, const IntRect& ori
ginBoundsInRootView, LocalFrame*); | 44 static PassRefPtr<MockPagePopup> create(PagePopupClient*, const IntRect& ori
ginBoundsInRootView, LocalFrame*); |
| 45 virtual ~MockPagePopup(); | 45 virtual ~MockPagePopup(); |
| 46 bool initialize(); | 46 bool initialize(); |
| 47 void closeLater(); | 47 void closeLater(); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 MockPagePopup(PagePopupClient*, const IntRect& originBoundsInRootView, Local
Frame*); | 50 MockPagePopup(PagePopupClient*, const IntRect& originBoundsInRootView, Local
Frame*); |
| 51 void close(Timer<MockPagePopup>*); | 51 void close(Timer<MockPagePopup>*); |
| 52 | 52 |
| 53 PagePopupClient* m_popupClient; | 53 PagePopupClient* m_popupClient; |
| 54 RefPtr<HTMLIFrameElement> m_iframe; | 54 RefPtrWillBePersistent<HTMLIFrameElement> m_iframe; |
| 55 Timer<MockPagePopup> m_closeTimer; | 55 Timer<MockPagePopup> m_closeTimer; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 inline MockPagePopup::MockPagePopup(PagePopupClient* client, const IntRect& orig
inBoundsInRootView, LocalFrame* mainFrame) | 58 inline MockPagePopup::MockPagePopup(PagePopupClient* client, const IntRect& orig
inBoundsInRootView, LocalFrame* mainFrame) |
| 59 : m_popupClient(client) | 59 : m_popupClient(client) |
| 60 , m_closeTimer(this, &MockPagePopup::close) | 60 , m_closeTimer(this, &MockPagePopup::close) |
| 61 { | 61 { |
| 62 Document* document = mainFrame->document(); | 62 Document* document = mainFrame->document(); |
| 63 ASSERT(document); | 63 ASSERT(document); |
| 64 m_iframe = HTMLIFrameElement::create(*document); | 64 m_iframe = HTMLIFrameElement::create(*document); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 { | 143 { |
| 144 if (!popup || popup != m_mockPagePopup.get()) | 144 if (!popup || popup != m_mockPagePopup.get()) |
| 145 return; | 145 return; |
| 146 m_mockPagePopup->closeLater(); | 146 m_mockPagePopup->closeLater(); |
| 147 m_mockPagePopup.clear(); | 147 m_mockPagePopup.clear(); |
| 148 m_pagePopupController->clearPagePopupClient(); | 148 m_pagePopupController->clearPagePopupClient(); |
| 149 m_pagePopupController.clear(); | 149 m_pagePopupController.clear(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } | 152 } |
| OLD | NEW |