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

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 474143002: Rename some functions of which names contain 'WebCore.' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 } 1536 }
1537 1537
1538 WebLocalFrameImpl::~WebLocalFrameImpl() 1538 WebLocalFrameImpl::~WebLocalFrameImpl()
1539 { 1539 {
1540 Platform::current()->decrementStatsCounter(webFrameActiveCount); 1540 Platform::current()->decrementStatsCounter(webFrameActiveCount);
1541 frameCount--; 1541 frameCount--;
1542 1542
1543 cancelPendingScopingEffort(); 1543 cancelPendingScopingEffort();
1544 } 1544 }
1545 1545
1546 void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<LocalFrame> frame) 1546 void WebLocalFrameImpl::setCoreFrame(PassRefPtr<LocalFrame> frame)
1547 { 1547 {
1548 m_frame = frame; 1548 m_frame = frame;
1549 1549
1550 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. 1550 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used.
1551 if (m_frame) { 1551 if (m_frame) {
1552 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl()); 1552 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl());
1553 if (m_client) 1553 if (m_client)
1554 notificationPresenter->initialize(m_client->notificationPresenter()) ; 1554 notificationPresenter->initialize(m_client->notificationPresenter()) ;
1555 1555
1556 provideNotification(*m_frame, notificationPresenter.release()); 1556 provideNotification(*m_frame, notificationPresenter.release());
1557 proviceNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create()); 1557 proviceNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create());
1558 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1558 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1559 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); 1559 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1560 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get())); 1560 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get()));
1561 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : 0)); 1561 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : 0));
1562 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); 1562 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
1563 1563
1564 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1564 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1565 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : 0); 1565 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : 0);
1566 } 1566 }
1567 } 1567 }
1568 1568
1569 PassRefPtr<LocalFrame> WebLocalFrameImpl::initializeWebCoreFrame(FrameHost* host , FrameOwner* owner, const AtomicString& name, const AtomicString& fallbackName) 1569 PassRefPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, F rameOwner* owner, const AtomicString& name, const AtomicString& fallbackName)
1570 { 1570 {
1571 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host , owner); 1571 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host , owner);
1572 setWebCoreFrame(frame); 1572 setCoreFrame(frame);
1573 frame->tree().setName(name, fallbackName); 1573 frame->tree().setName(name, fallbackName);
1574 // We must call init() after m_frame is assigned because it is referenced 1574 // We must call init() after m_frame is assigned because it is referenced
1575 // during init(). Note that this may dispatch JS events; the frame may be 1575 // during init(). Note that this may dispatch JS events; the frame may be
1576 // detached after init() returns. 1576 // detached after init() returns.
1577 frame->init(); 1577 frame->init();
1578 return frame; 1578 return frame;
1579 } 1579 }
1580 1580
1581 PassRefPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadReques t& request, HTMLFrameOwnerElement* ownerElement) 1581 PassRefPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadReques t& request, HTMLFrameOwnerElement* ownerElement)
1582 { 1582 {
1583 ASSERT(m_client); 1583 ASSERT(m_client);
1584 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, request.frameName())); 1584 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, request.frameName()));
1585 if (!webframeChild) 1585 if (!webframeChild)
1586 return nullptr; 1586 return nullptr;
1587 1587
1588 // FIXME: Using subResourceAttributeName as fallback is not a perfect 1588 // FIXME: Using subResourceAttributeName as fallback is not a perfect
1589 // solution. subResourceAttributeName returns just one attribute name. The 1589 // solution. subResourceAttributeName returns just one attribute name. The
1590 // element might not have the attribute, and there might be other attributes 1590 // element might not have the attribute, and there might be other attributes
1591 // which can identify the element. 1591 // which can identify the element.
1592 RefPtr<LocalFrame> child = webframeChild->initializeWebCoreFrame(frame()->ho st(), ownerElement, request.frameName(), ownerElement->getAttribute(ownerElement ->subResourceAttributeName())); 1592 RefPtr<LocalFrame> child = webframeChild->initializeCoreFrame(frame()->host( ), ownerElement, request.frameName(), ownerElement->getAttribute(ownerElement->s ubResourceAttributeName()));
1593 // Initializing the WebCore frame may cause the new child to be detached, si nce it may dispatch a load event in the parent. 1593 // Initializing the core frame may cause the new child to be detached, since
1594 // it may dispatch a load event in the parent.
1594 if (!child->tree().parent()) 1595 if (!child->tree().parent())
1595 return nullptr; 1596 return nullptr;
1596 1597
1597 // If we're moving in the back/forward list, we might want to replace the co ntent 1598 // If we're moving in the back/forward list, we might want to replace the co ntent
1598 // of this child frame with whatever was there at that point. 1599 // of this child frame with whatever was there at that point.
1599 RefPtr<HistoryItem> childItem; 1600 RefPtr<HistoryItem> childItem;
1600 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen t()->loadEventFinished()) 1601 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen t()->loadEventFinished())
1601 childItem = PassRefPtr<HistoryItem>(webframeChild->client()->historyItem ForNewChildFrame(webframeChild)); 1602 childItem = PassRefPtr<HistoryItem>(webframeChild->client()->historyItem ForNewChildFrame(webframeChild));
1602 1603
1603 if (childItem) 1604 if (childItem)
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 1867
1867 void WebLocalFrameImpl::invalidateAll() const 1868 void WebLocalFrameImpl::invalidateAll() const
1868 { 1869 {
1869 ASSERT(frame() && frame()->view()); 1870 ASSERT(frame() && frame()->view());
1870 FrameView* view = frame()->view(); 1871 FrameView* view = frame()->view();
1871 view->invalidateRect(view->frameRect()); 1872 view->invalidateRect(view->frameRect());
1872 invalidateScrollbar(); 1873 invalidateScrollbar();
1873 } 1874 }
1874 1875
1875 } // namespace blink 1876 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698