| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // Should only be called during initialization or swaps between local and | 204 // Should only be called during initialization or swaps between local and |
| 205 // remote frames. | 205 // remote frames. |
| 206 // FIXME: Unfortunately we can't assert on this at the moment, because this | 206 // FIXME: Unfortunately we can't assert on this at the moment, because this |
| 207 // is called in the base constructor for both LocalFrame and RemoteFrame, | 207 // is called in the base constructor for both LocalFrame and RemoteFrame, |
| 208 // when the vtables for the derived classes have not yet been setup. | 208 // when the vtables for the derived classes have not yet been setup. |
| 209 m_mainFrame = mainFrame; | 209 m_mainFrame = mainFrame; |
| 210 } | 210 } |
| 211 | 211 |
| 212 void Page::documentDetached(Document* document) | 212 void Page::documentDetached(Document* document) |
| 213 { | 213 { |
| 214 m_multisamplingChangedObservers.clear(); | |
| 215 m_pointerLockController->documentDetached(document); | 214 m_pointerLockController->documentDetached(document); |
| 216 m_contextMenuController->documentDetached(document); | 215 m_contextMenuController->documentDetached(document); |
| 217 if (m_validationMessageClient) | 216 if (m_validationMessageClient) |
| 218 m_validationMessageClient->documentDetached(*document); | 217 m_validationMessageClient->documentDetached(*document); |
| 219 m_originsUsingFeatures.documentDetached(*document); | 218 m_originsUsingFeatures.documentDetached(*document); |
| 220 } | 219 } |
| 221 | 220 |
| 222 bool Page::openedByDOM() const | 221 bool Page::openedByDOM() const |
| 223 { | 222 { |
| 224 return m_openedByDOM; | 223 return m_openedByDOM; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 bool Page::isPageVisible() const | 382 bool Page::isPageVisible() const |
| 384 { | 383 { |
| 385 return visibilityState() == PageVisibilityStateVisible; | 384 return visibilityState() == PageVisibilityStateVisible; |
| 386 } | 385 } |
| 387 | 386 |
| 388 bool Page::isCursorVisible() const | 387 bool Page::isCursorVisible() const |
| 389 { | 388 { |
| 390 return m_isCursorVisible && settings().deviceSupportsMouse(); | 389 return m_isCursorVisible && settings().deviceSupportsMouse(); |
| 391 } | 390 } |
| 392 | 391 |
| 393 void Page::addMultisamplingChangedObserver(MultisamplingChangedObserver* observe
r) | |
| 394 { | |
| 395 m_multisamplingChangedObservers.add(observer); | |
| 396 } | |
| 397 | |
| 398 // For Oilpan, unregistration is handled by the GC and weak references. | |
| 399 #if !ENABLE(OILPAN) | |
| 400 void Page::removeMultisamplingChangedObserver(MultisamplingChangedObserver* obse
rver) | |
| 401 { | |
| 402 m_multisamplingChangedObservers.remove(observer); | |
| 403 } | |
| 404 #endif | |
| 405 | |
| 406 void Page::settingsChanged(SettingsDelegate::ChangeType changeType) | 392 void Page::settingsChanged(SettingsDelegate::ChangeType changeType) |
| 407 { | 393 { |
| 408 switch (changeType) { | 394 switch (changeType) { |
| 409 case SettingsDelegate::StyleChange: | 395 case SettingsDelegate::StyleChange: |
| 410 setNeedsRecalcStyleInAllFrames(); | 396 setNeedsRecalcStyleInAllFrames(); |
| 411 break; | 397 break; |
| 412 case SettingsDelegate::ViewportDescriptionChange: | 398 case SettingsDelegate::ViewportDescriptionChange: |
| 413 if (mainFrame() && mainFrame()->isLocalFrame()) | 399 if (mainFrame() && mainFrame()->isLocalFrame()) |
| 414 deprecatedLocalMainFrame()->document()->updateViewportDescription(); | 400 deprecatedLocalMainFrame()->document()->updateViewportDescription(); |
| 415 break; | 401 break; |
| 416 case SettingsDelegate::DNSPrefetchingChange: | 402 case SettingsDelegate::DNSPrefetchingChange: |
| 417 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNe
xt()) { | 403 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNe
xt()) { |
| 418 if (frame->isLocalFrame()) | 404 if (frame->isLocalFrame()) |
| 419 toLocalFrame(frame)->document()->initDNSPrefetch(); | 405 toLocalFrame(frame)->document()->initDNSPrefetch(); |
| 420 } | 406 } |
| 421 break; | 407 break; |
| 422 case SettingsDelegate::MultisamplingChange: { | |
| 423 for (MultisamplingChangedObserver* observer : m_multisamplingChangedObse
rvers) | |
| 424 observer->multisamplingChanged(m_settings->openGLMultisamplingEnable
d()); | |
| 425 break; | |
| 426 } | |
| 427 case SettingsDelegate::ImageLoadingChange: | 408 case SettingsDelegate::ImageLoadingChange: |
| 428 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNe
xt()) { | 409 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNe
xt()) { |
| 429 if (frame->isLocalFrame()) { | 410 if (frame->isLocalFrame()) { |
| 430 toLocalFrame(frame)->document()->fetcher()->setImagesEnabled(set
tings().imagesEnabled()); | 411 toLocalFrame(frame)->document()->fetcher()->setImagesEnabled(set
tings().imagesEnabled()); |
| 431 toLocalFrame(frame)->document()->fetcher()->setAutoLoadImages(se
ttings().loadsImagesAutomatically()); | 412 toLocalFrame(frame)->document()->fetcher()->setAutoLoadImages(se
ttings().loadsImagesAutomatically()); |
| 432 } | 413 } |
| 433 } | 414 } |
| 434 break; | 415 break; |
| 435 case SettingsDelegate::TextAutosizingChange: | 416 case SettingsDelegate::TextAutosizingChange: |
| 436 if (!mainFrame() || !mainFrame()->isLocalFrame()) | 417 if (!mainFrame() || !mainFrame()->isLocalFrame()) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 visitor->trace(m_chromeClient); | 512 visitor->trace(m_chromeClient); |
| 532 visitor->trace(m_dragCaretController); | 513 visitor->trace(m_dragCaretController); |
| 533 visitor->trace(m_dragController); | 514 visitor->trace(m_dragController); |
| 534 visitor->trace(m_focusController); | 515 visitor->trace(m_focusController); |
| 535 visitor->trace(m_contextMenuController); | 516 visitor->trace(m_contextMenuController); |
| 536 visitor->trace(m_pointerLockController); | 517 visitor->trace(m_pointerLockController); |
| 537 visitor->trace(m_scrollingCoordinator); | 518 visitor->trace(m_scrollingCoordinator); |
| 538 visitor->trace(m_undoStack); | 519 visitor->trace(m_undoStack); |
| 539 visitor->trace(m_mainFrame); | 520 visitor->trace(m_mainFrame); |
| 540 visitor->trace(m_validationMessageClient); | 521 visitor->trace(m_validationMessageClient); |
| 541 visitor->trace(m_multisamplingChangedObservers); | |
| 542 visitor->trace(m_frameHost); | 522 visitor->trace(m_frameHost); |
| 543 visitor->trace(m_memoryPurgeController); | 523 visitor->trace(m_memoryPurgeController); |
| 544 Supplementable<Page>::trace(visitor); | 524 Supplementable<Page>::trace(visitor); |
| 545 PageLifecycleNotifier::trace(visitor); | 525 PageLifecycleNotifier::trace(visitor); |
| 546 MemoryPurgeClient::trace(visitor); | 526 MemoryPurgeClient::trace(visitor); |
| 547 } | 527 } |
| 548 | 528 |
| 549 void Page::layerTreeViewInitialized(WebLayerTreeView& layerTreeView) | 529 void Page::layerTreeViewInitialized(WebLayerTreeView& layerTreeView) |
| 550 { | 530 { |
| 551 if (scrollingCoordinator()) | 531 if (scrollingCoordinator()) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 { | 584 { |
| 605 } | 585 } |
| 606 | 586 |
| 607 Page::PageClients::~PageClients() | 587 Page::PageClients::~PageClients() |
| 608 { | 588 { |
| 609 } | 589 } |
| 610 | 590 |
| 611 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 591 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
| 612 | 592 |
| 613 } // namespace blink | 593 } // namespace blink |
| OLD | NEW |