Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: Source/core/page/Page.cpp

Issue 1303203002: Add MemoryPurgeController (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if (visibilityState == PageVisibilityStateVisible) 388 if (visibilityState == PageVisibilityStateVisible)
389 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); 389 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval());
390 else 390 else
391 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); 391 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval());
392 392
393 if (!isInitialState) 393 if (!isInitialState)
394 notifyPageVisibilityChanged(); 394 notifyPageVisibilityChanged();
395 395
396 if (!isInitialState && m_mainFrame && m_mainFrame->isLocalFrame()) 396 if (!isInitialState && m_mainFrame && m_mainFrame->isLocalFrame())
397 deprecatedLocalMainFrame()->didChangeVisibilityState(); 397 deprecatedLocalMainFrame()->didChangeVisibilityState();
398
399 // TODO(bashi): Invoke this few seconds later.
400 if (visibilityState != PageVisibilityStateVisible)
401 m_memoryPurgeController.didBecomeInactive();
398 } 402 }
399 403
400 PageVisibilityState Page::visibilityState() const 404 PageVisibilityState Page::visibilityState() const
401 { 405 {
402 return m_visibilityState; 406 return m_visibilityState;
403 } 407 }
404 408
405 bool Page::isCursorVisible() const 409 bool Page::isCursorVisible() const
406 { 410 {
407 return m_isCursorVisible && settings().deviceSupportsMouse(); 411 return m_isCursorVisible && settings().deviceSupportsMouse();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 { 598 {
595 } 599 }
596 600
597 Page::PageClients::~PageClients() 601 Page::PageClients::~PageClients()
598 { 602 {
599 } 603 }
600 604
601 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; 605 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>;
602 606
603 } // namespace blink 607 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698