| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 { | 378 { |
| 379 return m_timerAlignmentInterval; | 379 return m_timerAlignmentInterval; |
| 380 } | 380 } |
| 381 | 381 |
| 382 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) | 382 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) |
| 383 { | 383 { |
| 384 if (m_visibilityState == visibilityState) | 384 if (m_visibilityState == visibilityState) |
| 385 return; | 385 return; |
| 386 m_visibilityState = visibilityState; | 386 m_visibilityState = visibilityState; |
| 387 | 387 |
| 388 if (visibilityState == PageVisibilityStateVisible) | 388 if (visibilityState == PageVisibilityStateVisible) { |
| 389 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); | 389 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); |
| 390 else | 390 m_memoryPurgeController.pageBecameVisible(); |
| 391 } else { |
| 391 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); | 392 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); |
| 393 m_memoryPurgeController.pageBecameHidden(); |
| 394 } |
| 392 | 395 |
| 393 if (!isInitialState) | 396 if (!isInitialState) |
| 394 notifyPageVisibilityChanged(); | 397 notifyPageVisibilityChanged(); |
| 395 | 398 |
| 396 if (!isInitialState && m_mainFrame && m_mainFrame->isLocalFrame()) | 399 if (!isInitialState && m_mainFrame && m_mainFrame->isLocalFrame()) |
| 397 deprecatedLocalMainFrame()->didChangeVisibilityState(); | 400 deprecatedLocalMainFrame()->didChangeVisibilityState(); |
| 398 } | 401 } |
| 399 | 402 |
| 400 PageVisibilityState Page::visibilityState() const | 403 PageVisibilityState Page::visibilityState() const |
| 401 { | 404 { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 visitor->trace(m_contextMenuController); | 556 visitor->trace(m_contextMenuController); |
| 554 visitor->trace(m_pointerLockController); | 557 visitor->trace(m_pointerLockController); |
| 555 visitor->trace(m_scrollingCoordinator); | 558 visitor->trace(m_scrollingCoordinator); |
| 556 visitor->trace(m_undoStack); | 559 visitor->trace(m_undoStack); |
| 557 visitor->trace(m_mainFrame); | 560 visitor->trace(m_mainFrame); |
| 558 visitor->trace(m_validationMessageClient); | 561 visitor->trace(m_validationMessageClient); |
| 559 visitor->trace(m_multisamplingChangedObservers); | 562 visitor->trace(m_multisamplingChangedObservers); |
| 560 visitor->trace(m_frameHost); | 563 visitor->trace(m_frameHost); |
| 561 HeapSupplementable<Page>::trace(visitor); | 564 HeapSupplementable<Page>::trace(visitor); |
| 562 #endif | 565 #endif |
| 566 visitor->trace(m_memoryPurgeController); |
| 563 PageLifecycleNotifier::trace(visitor); | 567 PageLifecycleNotifier::trace(visitor); |
| 564 } | 568 } |
| 565 | 569 |
| 566 void Page::willBeDestroyed() | 570 void Page::willBeDestroyed() |
| 567 { | 571 { |
| 568 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; | 572 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; |
| 569 | 573 |
| 570 mainFrame->detach(FrameDetachType::Remove); | 574 mainFrame->detach(FrameDetachType::Remove); |
| 571 | 575 |
| 572 if (mainFrame->isLocalFrame()) { | 576 if (mainFrame->isLocalFrame()) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 { | 608 { |
| 605 } | 609 } |
| 606 | 610 |
| 607 Page::PageClients::~PageClients() | 611 Page::PageClients::~PageClients() |
| 608 { | 612 { |
| 609 } | 613 } |
| 610 | 614 |
| 611 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; | 615 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; |
| 612 | 616 |
| 613 } // namespace blink | 617 } // namespace blink |
| OLD | NEW |