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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 Page::PageSet& Page::ordinaryPages() 67 Page::PageSet& Page::ordinaryPages()
68 { 68 {
69 DEFINE_STATIC_LOCAL(Page::PageSet, ordinaryPages, ()); 69 DEFINE_STATIC_LOCAL(Page::PageSet, ordinaryPages, ());
70 return ordinaryPages; 70 return ordinaryPages;
71 } 71 }
72 72
73 void Page::networkStateChanged(bool online) 73 void Page::networkStateChanged(bool online)
74 { 74 {
75 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; 75 HeapVector<Member<LocalFrame>> frames;
76 76
77 // Get all the frames of all the pages in all the page groups 77 // Get all the frames of all the pages in all the page groups
78 for (Page* page : allPages()) { 78 for (Page* page : allPages()) {
79 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav erseNext()) { 79 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().trav erseNext()) {
80 // FIXME: There is currently no way to dispatch events to out-of-pro cess frames. 80 // FIXME: There is currently no way to dispatch events to out-of-pro cess frames.
81 if (frame->isLocalFrame()) 81 if (frame->isLocalFrame())
82 frames.append(toLocalFrame(frame)); 82 frames.append(toLocalFrame(frame));
83 } 83 }
84 } 84 }
85 85
(...skipping 13 matching lines...) Expand all
99 float deviceScaleFactor(LocalFrame* frame) 99 float deviceScaleFactor(LocalFrame* frame)
100 { 100 {
101 if (!frame) 101 if (!frame)
102 return 1; 102 return 1;
103 Page* page = frame->page(); 103 Page* page = frame->page();
104 if (!page) 104 if (!page)
105 return 1; 105 return 1;
106 return page->deviceScaleFactor(); 106 return page->deviceScaleFactor();
107 } 107 }
108 108
109 PassOwnPtrWillBeRawPtr<Page> Page::createOrdinary(PageClients& pageClients) 109 RawPtr<Page> Page::createOrdinary(PageClients& pageClients)
110 { 110 {
111 OwnPtrWillBeRawPtr<Page> page = create(pageClients); 111 RawPtr<Page> page = create(pageClients);
112 ordinaryPages().add(page.get()); 112 ordinaryPages().add(page.get());
113 page->memoryPurgeController().registerClient(page.get()); 113 page->memoryPurgeController().registerClient(page.get());
114 return page.release(); 114 return page.release();
115 } 115 }
116 116
117 Page::Page(PageClients& pageClients) 117 Page::Page(PageClients& pageClients)
118 : SettingsDelegate(Settings::create()) 118 : SettingsDelegate(Settings::create())
119 , m_animator(PageAnimator::create(*this)) 119 , m_animator(PageAnimator::create(*this))
120 , m_autoscrollController(AutoscrollController::create(*this)) 120 , m_autoscrollController(AutoscrollController::create(*this))
121 , m_chromeClient(pageClients.chromeClient) 121 , m_chromeClient(pageClients.chromeClient)
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 return; 276 return;
277 277
278 Frame* frame = mainFrame(); 278 Frame* frame = mainFrame();
279 do { 279 do {
280 if (frame->isLocalFrame()) 280 if (frame->isLocalFrame())
281 toLocalFrame(frame)->document()->markers().removeMarkers(DocumentMar ker::TextMatch); 281 toLocalFrame(frame)->document()->markers().removeMarkers(DocumentMar ker::TextMatch);
282 frame = frame->tree().traverseNextWithWrap(false); 282 frame = frame->tree().traverseNextWithWrap(false);
283 } while (frame); 283 } while (frame);
284 } 284 }
285 285
286 void Page::setValidationMessageClient(PassOwnPtrWillBeRawPtr<ValidationMessageCl ient> client) 286 void Page::setValidationMessageClient(RawPtr<ValidationMessageClient> client)
287 { 287 {
288 m_validationMessageClient = client; 288 m_validationMessageClient = client;
289 } 289 }
290 290
291 void Page::setDefersLoading(bool defers) 291 void Page::setDefersLoading(bool defers)
292 { 292 {
293 if (defers == m_defersLoading) 293 if (defers == m_defersLoading)
294 return; 294 return;
295 295
296 m_defersLoading = defers; 296 m_defersLoading = defers;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 useCounter().didCommitLoad(); 498 useCounter().didCommitLoad();
499 deprecation().clearSuppression(); 499 deprecation().clearSuppression();
500 frameHost().visualViewport().sendUMAMetrics(); 500 frameHost().visualViewport().sendUMAMetrics();
501 m_originsUsingFeatures.updateMeasurementsAndClear(); 501 m_originsUsingFeatures.updateMeasurementsAndClear();
502 UserGestureIndicator::clearProcessedUserGestureSinceLoad(); 502 UserGestureIndicator::clearProcessedUserGestureSinceLoad();
503 } 503 }
504 } 504 }
505 505
506 void Page::acceptLanguagesChanged() 506 void Page::acceptLanguagesChanged()
507 { 507 {
508 WillBeHeapVector<RefPtrWillBeMember<LocalFrame>> frames; 508 HeapVector<Member<LocalFrame>> frames;
509 509
510 // Even though we don't fire an event from here, the LocalDOMWindow's will f ire 510 // Even though we don't fire an event from here, the LocalDOMWindow's will f ire
511 // an event so we keep the frames alive until we are done. 511 // an event so we keep the frames alive until we are done.
512 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) { 512 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) {
513 if (frame->isLocalFrame()) 513 if (frame->isLocalFrame())
514 frames.append(toLocalFrame(frame)); 514 frames.append(toLocalFrame(frame));
515 } 515 }
516 516
517 for (unsigned i = 0; i < frames.size(); ++i) 517 for (unsigned i = 0; i < frames.size(); ++i)
518 frames[i]->localDOMWindow()->acceptLanguagesChanged(); 518 frames[i]->localDOMWindow()->acceptLanguagesChanged();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView); 560 m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView);
561 } 561 }
562 562
563 void Page::willBeClosed() 563 void Page::willBeClosed()
564 { 564 {
565 ordinaryPages().remove(this); 565 ordinaryPages().remove(this);
566 } 566 }
567 567
568 void Page::willBeDestroyed() 568 void Page::willBeDestroyed()
569 { 569 {
570 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; 570 RawPtr<Frame> mainFrame = m_mainFrame;
571 571
572 mainFrame->detach(FrameDetachType::Remove); 572 mainFrame->detach(FrameDetachType::Remove);
573 573
574 ASSERT(allPages().contains(this)); 574 ASSERT(allPages().contains(this));
575 allPages().remove(this); 575 allPages().remove(this);
576 ordinaryPages().remove(this); 576 ordinaryPages().remove(this);
577 #if !ENABLE(OILPAN) 577 #if !ENABLE(OILPAN)
578 if (m_memoryPurgeController) 578 if (m_memoryPurgeController)
579 m_memoryPurgeController->unregisterClient(this); 579 m_memoryPurgeController->unregisterClient(this);
580 #endif 580 #endif
(...skipping 22 matching lines...) Expand all
603 , editorClient(nullptr) 603 , editorClient(nullptr)
604 , dragClient(nullptr) 604 , dragClient(nullptr)
605 , spellCheckerClient(nullptr) 605 , spellCheckerClient(nullptr)
606 { 606 {
607 } 607 }
608 608
609 Page::PageClients::~PageClients() 609 Page::PageClients::~PageClients()
610 { 610 {
611 } 611 }
612 612
613 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; 613 template class CORE_TEMPLATE_EXPORT HeapSupplement<Page>;
614 614
615 } // namespace blink 615 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.h ('k') | third_party/WebKit/Source/core/page/PageAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698