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

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

Issue 2174263002: Defer loads in new pages/frames if ScopedPageLoadDeferral is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hammer Created 4 years, 4 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 28 matching lines...) Expand all
39 #include "core/html/HTMLMediaElement.h" 39 #include "core/html/HTMLMediaElement.h"
40 #include "core/inspector/ConsoleMessageStorage.h" 40 #include "core/inspector/ConsoleMessageStorage.h"
41 #include "core/inspector/InspectorInstrumentation.h" 41 #include "core/inspector/InspectorInstrumentation.h"
42 #include "core/layout/TextAutosizer.h" 42 #include "core/layout/TextAutosizer.h"
43 #include "core/page/AutoscrollController.h" 43 #include "core/page/AutoscrollController.h"
44 #include "core/page/ChromeClient.h" 44 #include "core/page/ChromeClient.h"
45 #include "core/page/ContextMenuController.h" 45 #include "core/page/ContextMenuController.h"
46 #include "core/page/DragController.h" 46 #include "core/page/DragController.h"
47 #include "core/page/FocusController.h" 47 #include "core/page/FocusController.h"
48 #include "core/page/PointerLockController.h" 48 #include "core/page/PointerLockController.h"
49 #include "core/page/ScopedPageLoadDeferrer.h"
49 #include "core/page/ValidationMessageClient.h" 50 #include "core/page/ValidationMessageClient.h"
50 #include "core/page/scrolling/ScrollingCoordinator.h" 51 #include "core/page/scrolling/ScrollingCoordinator.h"
51 #include "core/paint/PaintLayer.h" 52 #include "core/paint/PaintLayer.h"
52 #include "platform/graphics/GraphicsLayer.h" 53 #include "platform/graphics/GraphicsLayer.h"
53 #include "platform/plugins/PluginData.h" 54 #include "platform/plugins/PluginData.h"
54 #include "platform/text/CompressibleString.h" 55 #include "platform/text/CompressibleString.h"
55 #include "public/platform/Platform.h" 56 #include "public/platform/Platform.h"
56 57
57 namespace blink { 58 namespace blink {
58 59
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 Page* page = frame->page(); 98 Page* page = frame->page();
98 if (!page) 99 if (!page)
99 return 1; 100 return 1;
100 return page->deviceScaleFactor(); 101 return page->deviceScaleFactor();
101 } 102 }
102 103
103 Page* Page::createOrdinary(PageClients& pageClients) 104 Page* Page::createOrdinary(PageClients& pageClients)
104 { 105 {
105 Page* page = create(pageClients); 106 Page* page = create(pageClients);
106 ordinaryPages().add(page); 107 ordinaryPages().add(page);
108 ScopedPageLoadDeferrer::deferIfNeeded(page);
107 return page; 109 return page;
108 } 110 }
109 111
110 Page::Page(PageClients& pageClients) 112 Page::Page(PageClients& pageClients)
111 : SettingsDelegate(Settings::create()) 113 : SettingsDelegate(Settings::create())
112 , m_animator(PageAnimator::create(*this)) 114 , m_animator(PageAnimator::create(*this))
113 , m_autoscrollController(AutoscrollController::create(*this)) 115 , m_autoscrollController(AutoscrollController::create(*this))
114 , m_chromeClient(pageClients.chromeClient) 116 , m_chromeClient(pageClients.chromeClient)
115 , m_dragCaretController(DragCaretController::create()) 117 , m_dragCaretController(DragCaretController::create())
116 , m_dragController(DragController::create(this)) 118 , m_dragController(DragController::create(this))
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 { 550 {
549 } 551 }
550 552
551 Page::PageClients::~PageClients() 553 Page::PageClients::~PageClients()
552 { 554 {
553 } 555 }
554 556
555 template class CORE_TEMPLATE_EXPORT Supplement<Page>; 557 template class CORE_TEMPLATE_EXPORT Supplement<Page>;
556 558
557 } // namespace blink 559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698