OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All |
3 * Rights Reserved. | 3 * Rights Reserved. |
4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 m_validationMessageClient = client; | 253 m_validationMessageClient = client; |
254 } | 254 } |
255 | 255 |
256 void Page::setSuspended(bool suspend) { | 256 void Page::setSuspended(bool suspend) { |
257 if (suspend == m_suspended) | 257 if (suspend == m_suspended) |
258 return; | 258 return; |
259 | 259 |
260 m_suspended = suspend; | 260 m_suspended = suspend; |
261 for (Frame* frame = mainFrame(); frame; | 261 for (Frame* frame = mainFrame(); frame; |
262 frame = frame->tree().traverseNext()) { | 262 frame = frame->tree().traverseNext()) { |
263 if (frame->isLocalFrame()) | 263 if (!frame->isLocalFrame()) |
264 toLocalFrame(frame)->loader().setDefersLoading(suspend); | 264 continue; |
| 265 LocalFrame* localFrame = toLocalFrame(frame); |
| 266 if (Document* document = localFrame->document()) { |
| 267 if (suspend) |
| 268 document->suspendScheduledTasks(); |
| 269 else |
| 270 document->resumeScheduledTasks(); |
| 271 } |
| 272 |
| 273 localFrame->loader().setDefersLoading(suspend); |
265 } | 274 } |
266 } | 275 } |
267 | 276 |
268 void Page::setPageScaleFactor(float scale) { | 277 void Page::setPageScaleFactor(float scale) { |
269 frameHost().visualViewport().setScale(scale); | 278 frameHost().visualViewport().setScale(scale); |
270 } | 279 } |
271 | 280 |
272 float Page::pageScaleFactor() const { | 281 float Page::pageScaleFactor() const { |
273 return frameHost().visualViewport().scale(); | 282 return frameHost().visualViewport().scale(); |
274 } | 283 } |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 : chromeClient(nullptr), | 544 : chromeClient(nullptr), |
536 contextMenuClient(nullptr), | 545 contextMenuClient(nullptr), |
537 editorClient(nullptr), | 546 editorClient(nullptr), |
538 spellCheckerClient(nullptr) {} | 547 spellCheckerClient(nullptr) {} |
539 | 548 |
540 Page::PageClients::~PageClients() {} | 549 Page::PageClients::~PageClients() {} |
541 | 550 |
542 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 551 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
543 | 552 |
544 } // namespace blink | 553 } // namespace blink |
OLD | NEW |