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 27 matching lines...) Expand all Loading... |
38 #include "core/page/Chrome.h" | 38 #include "core/page/Chrome.h" |
39 #include "core/page/ContextMenuController.h" | 39 #include "core/page/ContextMenuController.h" |
40 #include "core/page/DOMTimer.h" | 40 #include "core/page/DOMTimer.h" |
41 #include "core/page/DragController.h" | 41 #include "core/page/DragController.h" |
42 #include "core/page/FocusController.h" | 42 #include "core/page/FocusController.h" |
43 #include "core/page/Frame.h" | 43 #include "core/page/Frame.h" |
44 #include "core/page/FrameTree.h" | 44 #include "core/page/FrameTree.h" |
45 #include "core/page/FrameView.h" | 45 #include "core/page/FrameView.h" |
46 #include "core/page/PageConsole.h" | 46 #include "core/page/PageConsole.h" |
47 #include "core/page/PageGroup.h" | 47 #include "core/page/PageGroup.h" |
| 48 #include "core/page/PageLifecycleNotifier.h" |
48 #include "core/page/PointerLockController.h" | 49 #include "core/page/PointerLockController.h" |
49 #include "core/page/Settings.h" | 50 #include "core/page/Settings.h" |
50 #include "core/page/scrolling/ScrollingCoordinator.h" | 51 #include "core/page/scrolling/ScrollingCoordinator.h" |
51 #include "core/platform/network/NetworkStateNotifier.h" | 52 #include "core/platform/network/NetworkStateNotifier.h" |
52 #include "core/plugins/PluginData.h" | 53 #include "core/plugins/PluginData.h" |
53 #include "core/rendering/RenderArena.h" | 54 #include "core/rendering/RenderArena.h" |
54 #include "core/rendering/RenderTheme.h" | 55 #include "core/rendering/RenderTheme.h" |
55 #include "core/rendering/RenderView.h" | 56 #include "core/rendering/RenderView.h" |
56 #include "core/storage/StorageNamespace.h" | 57 #include "core/storage/StorageNamespace.h" |
57 #include "wtf/HashMap.h" | 58 #include "wtf/HashMap.h" |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 ASSERT(m_subframeCount + 1 == subframeCount); | 630 ASSERT(m_subframeCount + 1 == subframeCount); |
630 } | 631 } |
631 #endif | 632 #endif |
632 | 633 |
633 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) | 634 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) |
634 { | 635 { |
635 if (m_visibilityState == visibilityState) | 636 if (m_visibilityState == visibilityState) |
636 return; | 637 return; |
637 m_visibilityState = visibilityState; | 638 m_visibilityState = visibilityState; |
638 | 639 |
| 640 if (!isInitialState) |
| 641 lifecycleNotifier()->notifyPageVisibilityChanged(); |
| 642 |
639 if (!isInitialState && m_mainFrame) | 643 if (!isInitialState && m_mainFrame) |
640 m_mainFrame->dispatchVisibilityStateChangeEvent(); | 644 m_mainFrame->dispatchVisibilityStateChangeEvent(); |
641 | 645 |
642 if (visibilityState == WebCore::PageVisibilityStateHidden) | 646 if (visibilityState == WebCore::PageVisibilityStateHidden) |
643 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); | 647 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); |
644 else | 648 else |
645 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); | 649 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); |
646 } | 650 } |
647 | 651 |
648 PageVisibilityState Page::visibilityState() const | 652 PageVisibilityState Page::visibilityState() const |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 m_multisamplingChangedObservers.remove(observer); | 828 m_multisamplingChangedObservers.remove(observer); |
825 } | 829 } |
826 | 830 |
827 void Page::multisamplingChanged() | 831 void Page::multisamplingChanged() |
828 { | 832 { |
829 HashSet<MultisamplingChangedObserver*>::iterator stop = m_multisamplingChang
edObservers.end(); | 833 HashSet<MultisamplingChangedObserver*>::iterator stop = m_multisamplingChang
edObservers.end(); |
830 for (HashSet<MultisamplingChangedObserver*>::iterator it = m_multisamplingCh
angedObservers.begin(); it != stop; ++it) | 834 for (HashSet<MultisamplingChangedObserver*>::iterator it = m_multisamplingCh
angedObservers.begin(); it != stop; ++it) |
831 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled()); | 835 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled()); |
832 } | 836 } |
833 | 837 |
| 838 PageLifecycleNotifier* Page::lifecycleNotifier() |
| 839 { |
| 840 return static_cast<PageLifecycleNotifier*>(LifecycleContext::lifecycleNotifi
er()); |
| 841 } |
| 842 |
| 843 PassOwnPtr<LifecycleNotifier> Page::createLifecycleNotifier() |
| 844 { |
| 845 return PageLifecycleNotifier::create(this); |
| 846 } |
| 847 |
834 Page::PageClients::PageClients() | 848 Page::PageClients::PageClients() |
835 : chromeClient(0) | 849 : chromeClient(0) |
836 , contextMenuClient(0) | 850 , contextMenuClient(0) |
837 , editorClient(0) | 851 , editorClient(0) |
838 , dragClient(0) | 852 , dragClient(0) |
839 , inspectorClient(0) | 853 , inspectorClient(0) |
840 { | 854 { |
841 } | 855 } |
842 | 856 |
843 Page::PageClients::~PageClients() | 857 Page::PageClients::~PageClients() |
844 { | 858 { |
845 } | 859 } |
846 | 860 |
847 } // namespace WebCore | 861 } // namespace WebCore |
OLD | NEW |