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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); |
520 } | 520 } |
521 | 521 |
522 void Page::purgeMemory(DeviceKind deviceKind) | 522 void Page::purgeMemory(DeviceKind deviceKind) |
523 { | 523 { |
524 if (deviceKind == DeviceKind::LowEnd) | 524 if (deviceKind == DeviceKind::LowEnd) |
525 memoryCache()->pruneAll(); | 525 memoryCache()->pruneAll(); |
| 526 |
| 527 // Ask each frame to purge memory. |
| 528 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { |
| 529 if (frame->isLocalFrame()) |
| 530 toLocalFrame(frame)->purgeMemory(deviceKind); |
| 531 } |
526 } | 532 } |
527 | 533 |
528 DEFINE_TRACE(Page) | 534 DEFINE_TRACE(Page) |
529 { | 535 { |
530 #if ENABLE(OILPAN) | 536 #if ENABLE(OILPAN) |
531 visitor->trace(m_animator); | 537 visitor->trace(m_animator); |
532 visitor->trace(m_autoscrollController); | 538 visitor->trace(m_autoscrollController); |
533 visitor->trace(m_chromeClient); | 539 visitor->trace(m_chromeClient); |
534 visitor->trace(m_dragCaretController); | 540 visitor->trace(m_dragCaretController); |
535 visitor->trace(m_dragController); | 541 visitor->trace(m_dragController); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 { | 613 { |
608 } | 614 } |
609 | 615 |
610 Page::PageClients::~PageClients() | 616 Page::PageClients::~PageClients() |
611 { | 617 { |
612 } | 618 } |
613 | 619 |
614 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; | 620 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; |
615 | 621 |
616 } // namespace blink | 622 } // namespace blink |
OLD | NEW |