| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 if (!frame) | 98 if (!frame) |
| 99 return 1; | 99 return 1; |
| 100 Page* page = frame->page(); | 100 Page* page = frame->page(); |
| 101 if (!page) | 101 if (!page) |
| 102 return 1; | 102 return 1; |
| 103 return page->deviceScaleFactor(); | 103 return page->deviceScaleFactor(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 Page* Page::createOrdinary(PageClients& pageClients) { | 106 Page* Page::createOrdinary(PageClients& pageClients) { |
| 107 Page* page = create(pageClients); | 107 Page* page = create(pageClients); |
| 108 ordinaryPages().add(page); | 108 ordinaryPages().insert(page); |
| 109 if (ScopedPageSuspender::isActive()) | 109 if (ScopedPageSuspender::isActive()) |
| 110 page->setSuspended(true); | 110 page->setSuspended(true); |
| 111 return page; | 111 return page; |
| 112 } | 112 } |
| 113 | 113 |
| 114 Page::Page(PageClients& pageClients) | 114 Page::Page(PageClients& pageClients) |
| 115 : SettingsDelegate(Settings::create()), | 115 : SettingsDelegate(Settings::create()), |
| 116 m_animator(PageAnimator::create(*this)), | 116 m_animator(PageAnimator::create(*this)), |
| 117 m_autoscrollController(AutoscrollController::create(*this)), | 117 m_autoscrollController(AutoscrollController::create(*this)), |
| 118 m_chromeClient(pageClients.chromeClient), | 118 m_chromeClient(pageClients.chromeClient), |
| (...skipping 13 matching lines...) Expand all Loading... |
| 132 m_openedByDOM(false), | 132 m_openedByDOM(false), |
| 133 m_tabKeyCyclesThroughElements(true), | 133 m_tabKeyCyclesThroughElements(true), |
| 134 m_suspended(false), | 134 m_suspended(false), |
| 135 m_deviceScaleFactor(1), | 135 m_deviceScaleFactor(1), |
| 136 m_visibilityState(PageVisibilityStateVisible), | 136 m_visibilityState(PageVisibilityStateVisible), |
| 137 m_isCursorVisible(true), | 137 m_isCursorVisible(true), |
| 138 m_frameHost(FrameHost::create(*this)) { | 138 m_frameHost(FrameHost::create(*this)) { |
| 139 ASSERT(m_editorClient); | 139 ASSERT(m_editorClient); |
| 140 | 140 |
| 141 ASSERT(!allPages().contains(this)); | 141 ASSERT(!allPages().contains(this)); |
| 142 allPages().add(this); | 142 allPages().insert(this); |
| 143 } | 143 } |
| 144 | 144 |
| 145 Page::~Page() { | 145 Page::~Page() { |
| 146 // willBeDestroyed() must be called before Page destruction. | 146 // willBeDestroyed() must be called before Page destruction. |
| 147 ASSERT(!m_mainFrame); | 147 ASSERT(!m_mainFrame); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void Page::closeSoon() { | 150 void Page::closeSoon() { |
| 151 // Make sure this Page can no longer be found by JS. | 151 // Make sure this Page can no longer be found by JS. |
| 152 m_isClosing = true; | 152 m_isClosing = true; |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 : chromeClient(nullptr), | 543 : chromeClient(nullptr), |
| 544 contextMenuClient(nullptr), | 544 contextMenuClient(nullptr), |
| 545 editorClient(nullptr), | 545 editorClient(nullptr), |
| 546 spellCheckerClient(nullptr) {} | 546 spellCheckerClient(nullptr) {} |
| 547 | 547 |
| 548 Page::PageClients::~PageClients() {} | 548 Page::PageClients::~PageClients() {} |
| 549 | 549 |
| 550 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 550 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
| 551 | 551 |
| 552 } // namespace blink | 552 } // namespace blink |
| OLD | NEW |