| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "core/page/PageConsole.h" | 45 #include "core/page/PageConsole.h" |
| 46 #include "core/page/PageGroup.h" | 46 #include "core/page/PageGroup.h" |
| 47 #include "core/page/PageLifecycleNotifier.h" | 47 #include "core/page/PageLifecycleNotifier.h" |
| 48 #include "core/page/PointerLockController.h" | 48 #include "core/page/PointerLockController.h" |
| 49 #include "core/page/Settings.h" | 49 #include "core/page/Settings.h" |
| 50 #include "core/page/ValidationMessageClient.h" | 50 #include "core/page/ValidationMessageClient.h" |
| 51 #include "core/page/scrolling/ScrollingCoordinator.h" | 51 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 52 #include "core/plugins/PluginData.h" | 52 #include "core/plugins/PluginData.h" |
| 53 #include "core/rendering/RenderView.h" | 53 #include "core/rendering/RenderView.h" |
| 54 #include "core/storage/StorageNamespace.h" | 54 #include "core/storage/StorageNamespace.h" |
| 55 #include "core/workers/SharedWorkerRepositoryClient.h" |
| 55 #include "wtf/HashMap.h" | 56 #include "wtf/HashMap.h" |
| 56 #include "wtf/RefCountedLeakCounter.h" | 57 #include "wtf/RefCountedLeakCounter.h" |
| 57 #include "wtf/StdLibExtras.h" | 58 #include "wtf/StdLibExtras.h" |
| 58 #include "wtf/text/Base64.h" | 59 #include "wtf/text/Base64.h" |
| 59 | 60 |
| 60 namespace WebCore { | 61 namespace WebCore { |
| 61 | 62 |
| 62 static HashSet<Page*>* allPages; | 63 static HashSet<Page*>* allPages; |
| 63 | 64 |
| 64 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page")); | 65 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 , m_dragController(DragController::create(this, pageClients.dragClient)) | 101 , m_dragController(DragController::create(this, pageClients.dragClient)) |
| 101 , m_focusController(FocusController::create(this)) | 102 , m_focusController(FocusController::create(this)) |
| 102 , m_contextMenuController(ContextMenuController::create(this, pageClients.co
ntextMenuClient)) | 103 , m_contextMenuController(ContextMenuController::create(this, pageClients.co
ntextMenuClient)) |
| 103 , m_inspectorController(InspectorController::create(this, pageClients.inspec
torClient)) | 104 , m_inspectorController(InspectorController::create(this, pageClients.inspec
torClient)) |
| 104 , m_pointerLockController(PointerLockController::create(this)) | 105 , m_pointerLockController(PointerLockController::create(this)) |
| 105 , m_settings(Settings::create(this)) | 106 , m_settings(Settings::create(this)) |
| 106 , m_progress(ProgressTracker::create()) | 107 , m_progress(ProgressTracker::create()) |
| 107 , m_backForwardClient(pageClients.backForwardClient) | 108 , m_backForwardClient(pageClients.backForwardClient) |
| 108 , m_editorClient(pageClients.editorClient) | 109 , m_editorClient(pageClients.editorClient) |
| 109 , m_validationMessageClient(0) | 110 , m_validationMessageClient(0) |
| 111 , m_sharedWorkerRepositoryClient(0) |
| 110 , m_subframeCount(0) | 112 , m_subframeCount(0) |
| 111 , m_openedByDOM(false) | 113 , m_openedByDOM(false) |
| 112 , m_tabKeyCyclesThroughElements(true) | 114 , m_tabKeyCyclesThroughElements(true) |
| 113 , m_defersLoading(false) | 115 , m_defersLoading(false) |
| 114 , m_pageScaleFactor(1) | 116 , m_pageScaleFactor(1) |
| 115 , m_deviceScaleFactor(1) | 117 , m_deviceScaleFactor(1) |
| 116 , m_didLoadUserStyleSheet(false) | 118 , m_didLoadUserStyleSheet(false) |
| 117 , m_group(0) | 119 , m_group(0) |
| 118 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) | 120 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) |
| 119 , m_visibilityState(PageVisibilityStateVisible) | 121 , m_visibilityState(PageVisibilityStateVisible) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 ASSERT(!m_mainFrame); // Should only be called during initialization | 257 ASSERT(!m_mainFrame); // Should only be called during initialization |
| 256 m_mainFrame = mainFrame; | 258 m_mainFrame = mainFrame; |
| 257 } | 259 } |
| 258 | 260 |
| 259 void Page::documentDetached(Document* document) | 261 void Page::documentDetached(Document* document) |
| 260 { | 262 { |
| 261 m_pointerLockController->documentDetached(document); | 263 m_pointerLockController->documentDetached(document); |
| 262 m_contextMenuController->documentDetached(document); | 264 m_contextMenuController->documentDetached(document); |
| 263 if (m_validationMessageClient) | 265 if (m_validationMessageClient) |
| 264 m_validationMessageClient->documentDetached(*document); | 266 m_validationMessageClient->documentDetached(*document); |
| 267 if (m_sharedWorkerRepositoryClient) |
| 268 m_sharedWorkerRepositoryClient->documentDetached(document); |
| 265 } | 269 } |
| 266 | 270 |
| 267 bool Page::openedByDOM() const | 271 bool Page::openedByDOM() const |
| 268 { | 272 { |
| 269 return m_openedByDOM; | 273 return m_openedByDOM; |
| 270 } | 274 } |
| 271 | 275 |
| 272 void Page::setOpenedByDOM() | 276 void Page::setOpenedByDOM() |
| 273 { | 277 { |
| 274 m_openedByDOM = true; | 278 m_openedByDOM = true; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 , inspectorClient(0) | 616 , inspectorClient(0) |
| 613 , backForwardClient(0) | 617 , backForwardClient(0) |
| 614 { | 618 { |
| 615 } | 619 } |
| 616 | 620 |
| 617 Page::PageClients::~PageClients() | 621 Page::PageClients::~PageClients() |
| 618 { | 622 { |
| 619 } | 623 } |
| 620 | 624 |
| 621 } // namespace WebCore | 625 } // namespace WebCore |
| OLD | NEW |