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

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

Issue 1991273003: Fire visibilityChange event on out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 { 351 {
352 static const double waitingTimeBeforeCompressingString = 10; 352 static const double waitingTimeBeforeCompressingString = 10;
353 353
354 if (m_visibilityState == visibilityState) 354 if (m_visibilityState == visibilityState)
355 return; 355 return;
356 m_visibilityState = visibilityState; 356 m_visibilityState = visibilityState;
357 357
358 if (!isInitialState) 358 if (!isInitialState)
359 notifyPageVisibilityChanged(); 359 notifyPageVisibilityChanged();
360 360
361 if (!isInitialState && m_mainFrame && m_mainFrame->isLocalFrame()) 361 if (!isInitialState && m_mainFrame)
362 deprecatedLocalMainFrame()->didChangeVisibilityState(); 362 m_mainFrame->didChangeVisibilityState();
kenrb 2016/05/24 20:25:18 How does this not crash in an OOPIF renderer?
kenrb 2016/05/24 20:33:20 Never mind, I just looked at this a bit closer. Th
lfg 2016/05/24 23:33:51 Right, Daniel moved that block from LocalFrame to
kenrb 2016/05/25 20:29:14 As an aside, related to a discussion we had on thi
lfg 2016/05/31 19:54:01 Acknowledged.
363 363
364 // Compress CompressibleStrings when 10 seconds have passed since the page 364 // Compress CompressibleStrings when 10 seconds have passed since the page
365 // went to background. 365 // went to background.
366 if (m_visibilityState == PageVisibilityStateHidden) { 366 if (m_visibilityState == PageVisibilityStateHidden) {
367 if (!m_timerForCompressStrings.isActive()) 367 if (!m_timerForCompressStrings.isActive())
368 m_timerForCompressStrings.startOneShot(waitingTimeBeforeCompressingS tring, BLINK_FROM_HERE); 368 m_timerForCompressStrings.startOneShot(waitingTimeBeforeCompressingS tring, BLINK_FROM_HERE);
369 } else if (m_timerForCompressStrings.isActive()) { 369 } else if (m_timerForCompressStrings.isActive()) {
370 m_timerForCompressStrings.stop(); 370 m_timerForCompressStrings.stop();
371 } 371 }
372 } 372 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 { 576 {
577 } 577 }
578 578
579 Page::PageClients::~PageClients() 579 Page::PageClients::~PageClients()
580 { 580 {
581 } 581 }
582 582
583 template class CORE_TEMPLATE_EXPORT Supplement<Page>; 583 template class CORE_TEMPLATE_EXPORT Supplement<Page>;
584 584
585 } // namespace blink 585 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698