| 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 if (m_mainFrame == frame) { | 528 if (m_mainFrame == frame) { |
| 529 useCounter().didCommitLoad(); | 529 useCounter().didCommitLoad(); |
| 530 m_inspectorController->didCommitLoadForMainFrame(); | 530 m_inspectorController->didCommitLoadForMainFrame(); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 void Page::acceptLanguagesChanged() | 534 void Page::acceptLanguagesChanged() |
| 535 { | 535 { |
| 536 Vector< RefPtr<LocalFrame> > frames; | 536 Vector< RefPtr<LocalFrame> > frames; |
| 537 | 537 |
| 538 // Even though we don't fire an event from here, the DOMWindow's will fire |
| 539 // an event so we keep the frames alive until we are done. |
| 538 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseN
ext()) | 540 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseN
ext()) |
| 539 frames.append(frame); | 541 frames.append(frame); |
| 540 | 542 |
| 541 for (unsigned i = 0; i < frames.size(); ++i) | 543 for (unsigned i = 0; i < frames.size(); ++i) |
| 542 frames[i]->domWindow()->dispatchEvent(Event::create(EventTypeNames::lang
uagechange)); | 544 frames[i]->domWindow()->acceptLanguagesChanged(); |
| 543 } | 545 } |
| 544 | 546 |
| 545 PageLifecycleNotifier& Page::lifecycleNotifier() | 547 PageLifecycleNotifier& Page::lifecycleNotifier() |
| 546 { | 548 { |
| 547 return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycle
Notifier()); | 549 return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycle
Notifier()); |
| 548 } | 550 } |
| 549 | 551 |
| 550 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier() | 552 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier() |
| 551 { | 553 { |
| 552 return PageLifecycleNotifier::create(this); | 554 return PageLifecycleNotifier::create(this); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 , spellCheckerClient(0) | 601 , spellCheckerClient(0) |
| 600 , storageClient(0) | 602 , storageClient(0) |
| 601 { | 603 { |
| 602 } | 604 } |
| 603 | 605 |
| 604 Page::PageClients::~PageClients() | 606 Page::PageClients::~PageClients() |
| 605 { | 607 { |
| 606 } | 608 } |
| 607 | 609 |
| 608 } // namespace WebCore | 610 } // namespace WebCore |
| OLD | NEW |