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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 #include "core/page/FocusController.h" | 46 #include "core/page/FocusController.h" |
47 #include "core/page/FrameTree.h" | 47 #include "core/page/FrameTree.h" |
48 #include "core/page/PageLifecycleNotifier.h" | 48 #include "core/page/PageLifecycleNotifier.h" |
49 #include "core/page/PointerLockController.h" | 49 #include "core/page/PointerLockController.h" |
50 #include "core/page/StorageClient.h" | 50 #include "core/page/StorageClient.h" |
51 #include "core/page/ValidationMessageClient.h" | 51 #include "core/page/ValidationMessageClient.h" |
52 #include "core/page/scrolling/ScrollingCoordinator.h" | 52 #include "core/page/scrolling/ScrollingCoordinator.h" |
53 #include "core/rendering/FastTextAutosizer.h" | 53 #include "core/rendering/FastTextAutosizer.h" |
54 #include "core/rendering/RenderView.h" | 54 #include "core/rendering/RenderView.h" |
55 #include "core/rendering/TextAutosizer.h" | 55 #include "core/rendering/TextAutosizer.h" |
56 #include "core/speech/SpeechInput.h" | |
56 #include "core/storage/StorageNamespace.h" | 57 #include "core/storage/StorageNamespace.h" |
57 #include "platform/plugins/PluginData.h" | 58 #include "platform/plugins/PluginData.h" |
58 #include "wtf/HashMap.h" | 59 #include "wtf/HashMap.h" |
59 #include "wtf/RefCountedLeakCounter.h" | 60 #include "wtf/RefCountedLeakCounter.h" |
60 #include "wtf/StdLibExtras.h" | 61 #include "wtf/StdLibExtras.h" |
61 #include "wtf/text/Base64.h" | 62 #include "wtf/text/Base64.h" |
62 | 63 |
63 namespace WebCore { | 64 namespace WebCore { |
64 | 65 |
65 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page")); | 66 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page")); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 break; | 464 break; |
464 case SettingsDelegate::MediaTypeChange: | 465 case SettingsDelegate::MediaTypeChange: |
465 m_mainFrame->view()->setMediaType(AtomicString(settings().mediaTypeOverr ide())); | 466 m_mainFrame->view()->setMediaType(AtomicString(settings().mediaTypeOverr ide())); |
466 setNeedsRecalcStyleInAllFrames(); | 467 setNeedsRecalcStyleInAllFrames(); |
467 break; | 468 break; |
468 case SettingsDelegate::DNSPrefetchingChange: | 469 case SettingsDelegate::DNSPrefetchingChange: |
469 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) | 470 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) |
470 frame->document()->initDNSPrefetch(); | 471 frame->document()->initDNSPrefetch(); |
471 break; | 472 break; |
472 case SettingsDelegate::MultisamplingChange: { | 473 case SettingsDelegate::MultisamplingChange: { |
473 HashSet<MultisamplingChangedObserver*>::iterator stop = m_multisamplingC hangedObservers.end(); | 474 WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedO bserver> >::iterator stop = m_multisamplingChangedObservers.end(); |
wibling-chromium
2014/04/24 14:43:06
Why is this a WillBePersistentHeapHashSet and not
Mads Ager (chromium)
2014/04/25 10:58:25
It should be. It is probably the same iterator typ
| |
474 for (HashSet<MultisamplingChangedObserver*>::iterator it = m_multisampli ngChangedObservers.begin(); it != stop; ++it) | 475 for (WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<MultisamplingCha ngedObserver> >::iterator it = m_multisamplingChangedObservers.begin(); it != st op; ++it) |
wibling-chromium
2014/04/24 14:43:06
Ditto.
Mads Ager (chromium)
2014/04/25 10:58:25
Done.
| |
475 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled() ); | 476 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled() ); |
476 break; | 477 break; |
477 } | 478 } |
478 case SettingsDelegate::ImageLoadingChange: | 479 case SettingsDelegate::ImageLoadingChange: |
479 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) { | 480 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) { |
480 frame->document()->fetcher()->setImagesEnabled(settings().imagesEnab led()); | 481 frame->document()->fetcher()->setImagesEnabled(settings().imagesEnab led()); |
481 frame->document()->fetcher()->setAutoLoadImages(settings().loadsImag esAutomatically()); | 482 frame->document()->fetcher()->setAutoLoadImages(settings().loadsImag esAutomatically()); |
482 } | 483 } |
483 break; | 484 break; |
484 case SettingsDelegate::TextAutosizingChange: | 485 case SettingsDelegate::TextAutosizingChange: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
532 return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycle Notifier()); | 533 return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycle Notifier()); |
533 } | 534 } |
534 | 535 |
535 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier() | 536 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier() |
536 { | 537 { |
537 return PageLifecycleNotifier::create(this); | 538 return PageLifecycleNotifier::create(this); |
538 } | 539 } |
539 | 540 |
540 void Page::trace(Visitor* visitor) | 541 void Page::trace(Visitor* visitor) |
541 { | 542 { |
543 visitor->registerWeakMembers<Page, &Page::clearWeakMembers>(this); | |
544 visitor->trace(m_multisamplingChangedObservers); | |
542 Supplementable<Page>::trace(visitor); | 545 Supplementable<Page>::trace(visitor); |
543 } | 546 } |
544 | 547 |
548 void Page::clearWeakMembers(Visitor* visitor) | |
549 { | |
550 SpeechInput* input = SpeechInput::from(this); | |
551 if (input) | |
552 input->clearWeakMembers(visitor); | |
553 } | |
554 | |
545 void Page::willBeDestroyed() | 555 void Page::willBeDestroyed() |
546 { | 556 { |
547 // Disable all agents prior to resetting the frame view. | 557 // Disable all agents prior to resetting the frame view. |
548 m_inspectorController->willBeDestroyed(); | 558 m_inspectorController->willBeDestroyed(); |
549 | 559 |
550 m_mainFrame->setView(nullptr); | 560 m_mainFrame->setView(nullptr); |
551 | 561 |
552 allPages().remove(this); | 562 allPages().remove(this); |
553 if (ordinaryPages().contains(this)) | 563 if (ordinaryPages().contains(this)) |
554 ordinaryPages().remove(this); | 564 ordinaryPages().remove(this); |
(...skipping 25 matching lines...) Expand all Loading... | |
580 , spellCheckerClient(0) | 590 , spellCheckerClient(0) |
581 , storageClient(0) | 591 , storageClient(0) |
582 { | 592 { |
583 } | 593 } |
584 | 594 |
585 Page::PageClients::~PageClients() | 595 Page::PageClients::~PageClients() |
586 { | 596 { |
587 } | 597 } |
588 | 598 |
589 } // namespace WebCore | 599 } // namespace WebCore |
OLD | NEW |