OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All |
3 * Rights Reserved. | 3 * Rights Reserved. |
4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void Page::networkStateChanged(bool online) { | 75 void Page::networkStateChanged(bool online) { |
76 HeapVector<Member<LocalFrame>> frames; | 76 HeapVector<Member<LocalFrame>> frames; |
77 | 77 |
78 // Get all the frames of all the pages in all the page groups | 78 // Get all the frames of all the pages in all the page groups |
79 for (Page* page : allPages()) { | 79 for (Page* page : allPages()) { |
80 for (Frame* frame = page->mainFrame(); frame; | 80 for (Frame* frame = page->mainFrame(); frame; |
81 frame = frame->tree().traverseNext()) { | 81 frame = frame->tree().traverseNext()) { |
82 // FIXME: There is currently no way to dispatch events to out-of-process | 82 // FIXME: There is currently no way to dispatch events to out-of-process |
83 // frames. | 83 // frames. |
84 if (frame->isLocalFrame()) | 84 if (frame->isLocalFrame()) |
85 frames.append(toLocalFrame(frame)); | 85 frames.push_back(toLocalFrame(frame)); |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 AtomicString eventName = | 89 AtomicString eventName = |
90 online ? EventTypeNames::online : EventTypeNames::offline; | 90 online ? EventTypeNames::online : EventTypeNames::offline; |
91 for (const auto& frame : frames) { | 91 for (const auto& frame : frames) { |
92 frame->domWindow()->dispatchEvent(Event::create(eventName)); | 92 frame->domWindow()->dispatchEvent(Event::create(eventName)); |
93 InspectorInstrumentation::networkStateChanged(frame.get(), online); | 93 InspectorInstrumentation::networkStateChanged(frame.get(), online); |
94 } | 94 } |
95 } | 95 } |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 } | 478 } |
479 | 479 |
480 void Page::acceptLanguagesChanged() { | 480 void Page::acceptLanguagesChanged() { |
481 HeapVector<Member<LocalFrame>> frames; | 481 HeapVector<Member<LocalFrame>> frames; |
482 | 482 |
483 // Even though we don't fire an event from here, the LocalDOMWindow's will | 483 // Even though we don't fire an event from here, the LocalDOMWindow's will |
484 // fire an event so we keep the frames alive until we are done. | 484 // fire an event so we keep the frames alive until we are done. |
485 for (Frame* frame = mainFrame(); frame; | 485 for (Frame* frame = mainFrame(); frame; |
486 frame = frame->tree().traverseNext()) { | 486 frame = frame->tree().traverseNext()) { |
487 if (frame->isLocalFrame()) | 487 if (frame->isLocalFrame()) |
488 frames.append(toLocalFrame(frame)); | 488 frames.push_back(toLocalFrame(frame)); |
489 } | 489 } |
490 | 490 |
491 for (unsigned i = 0; i < frames.size(); ++i) | 491 for (unsigned i = 0; i < frames.size(); ++i) |
492 frames[i]->domWindow()->acceptLanguagesChanged(); | 492 frames[i]->domWindow()->acceptLanguagesChanged(); |
493 } | 493 } |
494 | 494 |
495 DEFINE_TRACE(Page) { | 495 DEFINE_TRACE(Page) { |
496 visitor->trace(m_animator); | 496 visitor->trace(m_animator); |
497 visitor->trace(m_autoscrollController); | 497 visitor->trace(m_autoscrollController); |
498 visitor->trace(m_chromeClient); | 498 visitor->trace(m_chromeClient); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 : chromeClient(nullptr), | 543 : chromeClient(nullptr), |
544 contextMenuClient(nullptr), | 544 contextMenuClient(nullptr), |
545 editorClient(nullptr), | 545 editorClient(nullptr), |
546 spellCheckerClient(nullptr) {} | 546 spellCheckerClient(nullptr) {} |
547 | 547 |
548 Page::PageClients::~PageClients() {} | 548 Page::PageClients::~PageClients() {} |
549 | 549 |
550 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 550 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
551 | 551 |
552 } // namespace blink | 552 } // namespace blink |
OLD | NEW |