| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
ights Reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
ights Reserved. |
| 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 Page::PageSet& Page::ordinaryPages() | 66 Page::PageSet& Page::ordinaryPages() |
| 67 { | 67 { |
| 68 DEFINE_STATIC_LOCAL(Page::PageSet, ordinaryPages, ()); | 68 DEFINE_STATIC_LOCAL(Page::PageSet, ordinaryPages, ()); |
| 69 return ordinaryPages; | 69 return ordinaryPages; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void Page::networkStateChanged(bool online) | 72 void Page::networkStateChanged(bool online) |
| 73 { | 73 { |
| 74 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; | 74 HeapVector<Member<LocalFrame>> frames; |
| 75 | 75 |
| 76 // Get all the frames of all the pages in all the page groups | 76 // Get all the frames of all the pages in all the page groups |
| 77 for (Page* page : allPages()) { | 77 for (Page* page : allPages()) { |
| 78 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav
erseNext()) { | 78 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav
erseNext()) { |
| 79 // FIXME: There is currently no way to dispatch events to out-of-pro
cess frames. | 79 // FIXME: There is currently no way to dispatch events to out-of-pro
cess frames. |
| 80 if (frame->isLocalFrame()) | 80 if (frame->isLocalFrame()) |
| 81 frames.append(toLocalFrame(frame)); | 81 frames.append(toLocalFrame(frame)); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 98 float deviceScaleFactor(LocalFrame* frame) | 98 float deviceScaleFactor(LocalFrame* frame) |
| 99 { | 99 { |
| 100 if (!frame) | 100 if (!frame) |
| 101 return 1; | 101 return 1; |
| 102 Page* page = frame->page(); | 102 Page* page = frame->page(); |
| 103 if (!page) | 103 if (!page) |
| 104 return 1; | 104 return 1; |
| 105 return page->deviceScaleFactor(); | 105 return page->deviceScaleFactor(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 PassOwnPtrWillBeRawPtr<Page> Page::createOrdinary(PageClients& pageClients) | 108 RawPtr<Page> Page::createOrdinary(PageClients& pageClients) |
| 109 { | 109 { |
| 110 OwnPtrWillBeRawPtr<Page> page = create(pageClients); | 110 RawPtr<Page> page = create(pageClients); |
| 111 ordinaryPages().add(page.get()); | 111 ordinaryPages().add(page.get()); |
| 112 page->memoryPurgeController().registerClient(page.get()); | 112 page->memoryPurgeController().registerClient(page.get()); |
| 113 return page.release(); | 113 return page.release(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 Page::Page(PageClients& pageClients) | 116 Page::Page(PageClients& pageClients) |
| 117 : SettingsDelegate(Settings::create()) | 117 : SettingsDelegate(Settings::create()) |
| 118 , m_animator(PageAnimator::create(*this)) | 118 , m_animator(PageAnimator::create(*this)) |
| 119 , m_autoscrollController(AutoscrollController::create(*this)) | 119 , m_autoscrollController(AutoscrollController::create(*this)) |
| 120 , m_chromeClient(pageClients.chromeClient) | 120 , m_chromeClient(pageClients.chromeClient) |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return; | 275 return; |
| 276 | 276 |
| 277 Frame* frame = mainFrame(); | 277 Frame* frame = mainFrame(); |
| 278 do { | 278 do { |
| 279 if (frame->isLocalFrame()) | 279 if (frame->isLocalFrame()) |
| 280 toLocalFrame(frame)->document()->markers().removeMarkers(DocumentMar
ker::TextMatch); | 280 toLocalFrame(frame)->document()->markers().removeMarkers(DocumentMar
ker::TextMatch); |
| 281 frame = frame->tree().traverseNextWithWrap(false); | 281 frame = frame->tree().traverseNextWithWrap(false); |
| 282 } while (frame); | 282 } while (frame); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void Page::setValidationMessageClient(PassOwnPtrWillBeRawPtr<ValidationMessageCl
ient> client) | 285 void Page::setValidationMessageClient(RawPtr<ValidationMessageClient> client) |
| 286 { | 286 { |
| 287 m_validationMessageClient = client; | 287 m_validationMessageClient = client; |
| 288 } | 288 } |
| 289 | 289 |
| 290 void Page::setDefersLoading(bool defers) | 290 void Page::setDefersLoading(bool defers) |
| 291 { | 291 { |
| 292 if (defers == m_defersLoading) | 292 if (defers == m_defersLoading) |
| 293 return; | 293 return; |
| 294 | 294 |
| 295 m_defersLoading = defers; | 295 m_defersLoading = defers; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 useCounter().didCommitLoad(); | 499 useCounter().didCommitLoad(); |
| 500 deprecation().clearSuppression(); | 500 deprecation().clearSuppression(); |
| 501 frameHost().visualViewport().sendUMAMetrics(); | 501 frameHost().visualViewport().sendUMAMetrics(); |
| 502 m_originsUsingFeatures.updateMeasurementsAndClear(); | 502 m_originsUsingFeatures.updateMeasurementsAndClear(); |
| 503 UserGestureIndicator::clearProcessedUserGestureSinceLoad(); | 503 UserGestureIndicator::clearProcessedUserGestureSinceLoad(); |
| 504 } | 504 } |
| 505 } | 505 } |
| 506 | 506 |
| 507 void Page::acceptLanguagesChanged() | 507 void Page::acceptLanguagesChanged() |
| 508 { | 508 { |
| 509 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; | 509 HeapVector<Member<LocalFrame>> frames; |
| 510 | 510 |
| 511 // Even though we don't fire an event from here, the LocalDOMWindow's will f
ire | 511 // Even though we don't fire an event from here, the LocalDOMWindow's will f
ire |
| 512 // an event so we keep the frames alive until we are done. | 512 // an event so we keep the frames alive until we are done. |
| 513 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { | 513 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { |
| 514 if (frame->isLocalFrame()) | 514 if (frame->isLocalFrame()) |
| 515 frames.append(toLocalFrame(frame)); | 515 frames.append(toLocalFrame(frame)); |
| 516 } | 516 } |
| 517 | 517 |
| 518 for (unsigned i = 0; i < frames.size(); ++i) | 518 for (unsigned i = 0; i < frames.size(); ++i) |
| 519 frames[i]->localDOMWindow()->acceptLanguagesChanged(); | 519 frames[i]->localDOMWindow()->acceptLanguagesChanged(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView); | 561 m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView); |
| 562 } | 562 } |
| 563 | 563 |
| 564 void Page::willBeClosed() | 564 void Page::willBeClosed() |
| 565 { | 565 { |
| 566 ordinaryPages().remove(this); | 566 ordinaryPages().remove(this); |
| 567 } | 567 } |
| 568 | 568 |
| 569 void Page::willBeDestroyed() | 569 void Page::willBeDestroyed() |
| 570 { | 570 { |
| 571 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; | 571 RawPtr<Frame> mainFrame = m_mainFrame; |
| 572 | 572 |
| 573 mainFrame->detach(FrameDetachType::Remove); | 573 mainFrame->detach(FrameDetachType::Remove); |
| 574 | 574 |
| 575 ASSERT(allPages().contains(this)); | 575 ASSERT(allPages().contains(this)); |
| 576 allPages().remove(this); | 576 allPages().remove(this); |
| 577 ordinaryPages().remove(this); | 577 ordinaryPages().remove(this); |
| 578 #if !ENABLE(OILPAN) | 578 #if !ENABLE(OILPAN) |
| 579 if (m_memoryPurgeController) | 579 if (m_memoryPurgeController) |
| 580 m_memoryPurgeController->unregisterClient(this); | 580 m_memoryPurgeController->unregisterClient(this); |
| 581 #endif | 581 #endif |
| (...skipping 22 matching lines...) Expand all Loading... |
| 604 , editorClient(nullptr) | 604 , editorClient(nullptr) |
| 605 , dragClient(nullptr) | 605 , dragClient(nullptr) |
| 606 , spellCheckerClient(nullptr) | 606 , spellCheckerClient(nullptr) |
| 607 { | 607 { |
| 608 } | 608 } |
| 609 | 609 |
| 610 Page::PageClients::~PageClients() | 610 Page::PageClients::~PageClients() |
| 611 { | 611 { |
| 612 } | 612 } |
| 613 | 613 |
| 614 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; | 614 template class CORE_TEMPLATE_EXPORT HeapSupplement<Page>; |
| 615 | 615 |
| 616 } // namespace blink | 616 } // namespace blink |
| OLD | NEW |