| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 { | 85 { |
| 86 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; | 86 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; |
| 87 | 87 |
| 88 // Get all the frames of all the pages in all the page groups | 88 // Get all the frames of all the pages in all the page groups |
| 89 for (Page* page : allPages()) { | 89 for (Page* page : allPages()) { |
| 90 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav
erseNext()) { | 90 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav
erseNext()) { |
| 91 // FIXME: There is currently no way to dispatch events to out-of-pro
cess frames. | 91 // FIXME: There is currently no way to dispatch events to out-of-pro
cess frames. |
| 92 if (frame->isLocalFrame()) | 92 if (frame->isLocalFrame()) |
| 93 frames.append(toLocalFrame(frame)); | 93 frames.append(toLocalFrame(frame)); |
| 94 } | 94 } |
| 95 InspectorInstrumentation::networkStateChanged(page, online); | |
| 96 } | 95 } |
| 97 | 96 |
| 98 AtomicString eventName = online ? EventTypeNames::online : EventTypeNames::o
ffline; | 97 AtomicString eventName = online ? EventTypeNames::online : EventTypeNames::o
ffline; |
| 99 for (unsigned i = 0; i < frames.size(); i++) | 98 for (unsigned i = 0; i < frames.size(); i++) { |
| 100 frames[i]->domWindow()->dispatchEvent(Event::create(eventName)); | 99 frames[i]->domWindow()->dispatchEvent(Event::create(eventName)); |
| 100 InspectorInstrumentation::networkStateChanged(frames[i].get(), online); |
| 101 } |
| 101 } | 102 } |
| 102 | 103 |
| 103 float deviceScaleFactor(LocalFrame* frame) | 104 float deviceScaleFactor(LocalFrame* frame) |
| 104 { | 105 { |
| 105 if (!frame) | 106 if (!frame) |
| 106 return 1; | 107 return 1; |
| 107 Page* page = frame->page(); | 108 Page* page = frame->page(); |
| 108 if (!page) | 109 if (!page) |
| 109 return 1; | 110 return 1; |
| 110 return page->deviceScaleFactor(); | 111 return page->deviceScaleFactor(); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 , inspectorClient(nullptr) | 620 , inspectorClient(nullptr) |
| 620 , spellCheckerClient(nullptr) | 621 , spellCheckerClient(nullptr) |
| 621 { | 622 { |
| 622 } | 623 } |
| 623 | 624 |
| 624 Page::PageClients::~PageClients() | 625 Page::PageClients::~PageClients() |
| 625 { | 626 { |
| 626 } | 627 } |
| 627 | 628 |
| 628 } // namespace blink | 629 } // namespace blink |
| OLD | NEW |