Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: Source/core/page/Page.cpp

Issue 284793003: Implement languagechange event, fired when accept languages changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase and add tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 void Page::didCommitLoad(LocalFrame* frame) 525 void Page::didCommitLoad(LocalFrame* frame)
526 { 526 {
527 lifecycleNotifier().notifyDidCommitLoad(frame); 527 lifecycleNotifier().notifyDidCommitLoad(frame);
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()
535 {
536 Vector< RefPtr<LocalFrame> > frames;
537
538 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().traverseN ext())
539 frames.append(frame);
540
541 for (unsigned i = 0; i < frames.size(); ++i)
542 frames[i]->domWindow()->dispatchEvent(Event::create(EventTypeNames::lang uagechange));
543 }
544
534 PageLifecycleNotifier& Page::lifecycleNotifier() 545 PageLifecycleNotifier& Page::lifecycleNotifier()
535 { 546 {
536 return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycle Notifier()); 547 return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycle Notifier());
537 } 548 }
538 549
539 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier() 550 PassOwnPtr<LifecycleNotifier<Page> > Page::createLifecycleNotifier()
540 { 551 {
541 return PageLifecycleNotifier::create(this); 552 return PageLifecycleNotifier::create(this);
542 } 553 }
543 554
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 , spellCheckerClient(0) 597 , spellCheckerClient(0)
587 , storageClient(0) 598 , storageClient(0)
588 { 599 {
589 } 600 }
590 601
591 Page::PageClients::~PageClients() 602 Page::PageClients::~PageClients()
592 { 603 {
593 } 604 }
594 605
595 } // namespace WebCore 606 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698