Chromium Code Reviews| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 { | 86 { |
| 87 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; | 87 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; |
| 88 | 88 |
| 89 // Get all the frames of all the pages in all the page groups | 89 // Get all the frames of all the pages in all the page groups |
| 90 for (Page* page : allPages()) { | 90 for (Page* page : allPages()) { |
| 91 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav erseNext()) { | 91 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav erseNext()) { |
| 92 // FIXME: There is currently no way to dispatch events to out-of-pro cess frames. | 92 // FIXME: There is currently no way to dispatch events to out-of-pro cess frames. |
| 93 if (frame->isLocalFrame()) | 93 if (frame->isLocalFrame()) |
| 94 frames.append(toLocalFrame(frame)); | 94 frames.append(toLocalFrame(frame)); |
| 95 } | 95 } |
| 96 InspectorInstrumentation::networkStateChanged(page, online); | |
| 97 } | 96 } |
| 98 | 97 |
| 99 AtomicString eventName = online ? EventTypeNames::online : EventTypeNames::o ffline; | 98 AtomicString eventName = online ? EventTypeNames::online : EventTypeNames::o ffline; |
| 100 for (unsigned i = 0; i < frames.size(); i++) | 99 for (unsigned i = 0; i < frames.size(); i++) { |
| 101 frames[i]->domWindow()->dispatchEvent(Event::create(eventName)); | 100 frames[i]->domWindow()->dispatchEvent(Event::create(eventName)); |
| 101 InspectorInstrumentation::networkStateChanged(frames[i].get(), online); | |
|
yurys
2015/02/03 06:44:00
Don't we expect this event to be dispatched once p
pfeldman
2015/02/03 07:09:16
Present plan is to attach to connected localframe
| |
| 102 } | |
| 102 } | 103 } |
| 103 | 104 |
| 104 float deviceScaleFactor(LocalFrame* frame) | 105 float deviceScaleFactor(LocalFrame* frame) |
| 105 { | 106 { |
| 106 if (!frame) | 107 if (!frame) |
| 107 return 1; | 108 return 1; |
| 108 Page* page = frame->page(); | 109 Page* page = frame->page(); |
| 109 if (!page) | 110 if (!page) |
| 110 return 1; | 111 return 1; |
| 111 return page->deviceScaleFactor(); | 112 return page->deviceScaleFactor(); |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 629 , inspectorClient(nullptr) | 630 , inspectorClient(nullptr) |
| 630 , spellCheckerClient(nullptr) | 631 , spellCheckerClient(nullptr) |
| 631 { | 632 { |
| 632 } | 633 } |
| 633 | 634 |
| 634 Page::PageClients::~PageClients() | 635 Page::PageClients::~PageClients() |
| 635 { | 636 { |
| 636 } | 637 } |
| 637 | 638 |
| 638 } // namespace blink | 639 } // namespace blink |
| OLD | NEW |