Changeset 83509 in webkit


Ignore:
Timestamp:
Apr 11, 2011 3:04:47 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-04-11 Anders Carlsson <andersca@apple.com>

Reviewed by Adam Roben.

Remove the WebContext member variable from WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=58271

  • UIProcess/API/C/WKPage.cpp: (WKPageGetContext):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::create): (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::process): (WebKit::WebPageProxy::reattachToWebProcess): (WebKit::WebPageProxy::canShowMIMEType): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): (WebKit::WebPageProxy::didFinishLoadForFrame): (WebKit::WebPageProxy::didFailLoadForFrame): (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): (WebKit::WebPageProxy::didReceiveTitleForFrame): (WebKit::WebPageProxy::didFirstLayoutForFrame): (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame): (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): (WebKit::WebPageProxy::didRunInsecureContentForFrame): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::willSubmitForm): (WebKit::WebPageProxy::mouseDidMoveOverElement): (WebKit::WebPageProxy::showContextMenu): (WebKit::WebPageProxy::contextMenuItemSelected):
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage):
  • UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage):
Location:
trunk/Source/WebKit2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r83508 r83509  
     12011-04-11  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Remove the WebContext member variable from WebPageProxy
     6        https://bugs.webkit.org/show_bug.cgi?id=58271
     7
     8        * UIProcess/API/C/WKPage.cpp:
     9        (WKPageGetContext):
     10        * UIProcess/WebPageProxy.cpp:
     11        (WebKit::WebPageProxy::create):
     12        (WebKit::WebPageProxy::WebPageProxy):
     13        (WebKit::WebPageProxy::process):
     14        (WebKit::WebPageProxy::reattachToWebProcess):
     15        (WebKit::WebPageProxy::canShowMIMEType):
     16        (WebKit::WebPageProxy::receivedPolicyDecision):
     17        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
     18        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
     19        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
     20        (WebKit::WebPageProxy::didCommitLoadForFrame):
     21        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
     22        (WebKit::WebPageProxy::didFinishLoadForFrame):
     23        (WebKit::WebPageProxy::didFailLoadForFrame):
     24        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
     25        (WebKit::WebPageProxy::didReceiveTitleForFrame):
     26        (WebKit::WebPageProxy::didFirstLayoutForFrame):
     27        (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
     28        (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
     29        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
     30        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
     31        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
     32        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
     33        (WebKit::WebPageProxy::decidePolicyForResponse):
     34        (WebKit::WebPageProxy::unableToImplementPolicy):
     35        (WebKit::WebPageProxy::willSubmitForm):
     36        (WebKit::WebPageProxy::mouseDidMoveOverElement):
     37        (WebKit::WebPageProxy::showContextMenu):
     38        (WebKit::WebPageProxy::contextMenuItemSelected):
     39        * UIProcess/WebPageProxy.h:
     40        * UIProcess/WebProcessProxy.cpp:
     41        (WebKit::WebProcessProxy::createWebPage):
     42        * UIProcess/mac/WebInspectorProxyMac.mm:
     43        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
     44
    1452011-04-11  Eric Carlson  <eric.carlson@apple.com>
    246
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp

    r81237 r83509  
    3333#include "WebData.h"
    3434#include "WebPageProxy.h"
     35#include "WebProcessProxy.h"
    3536
    3637#ifdef __BLOCKS__
     
    4748WKContextRef WKPageGetContext(WKPageRef pageRef)
    4849{
    49     return toAPI(toImpl(pageRef)->context());
     50    return toAPI(toImpl(pageRef)->process()->context());
    5051}
    5152
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r83499 r83509  
    101101#endif
    102102
    103 PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient* pageClient, PassRefPtr<WebProcessProxy> process, WebContext* context, WebPageGroup* pageGroup, uint64_t pageID)
    104 {
    105     return adoptRef(new WebPageProxy(pageClient, process, context, pageGroup, pageID));
    106 }
    107 
    108 WebPageProxy::WebPageProxy(PageClient* pageClient, PassRefPtr<WebProcessProxy> process, WebContext* context, WebPageGroup* pageGroup, uint64_t pageID)
     103PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient* pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID)
     104{
     105    return adoptRef(new WebPageProxy(pageClient, process, pageGroup, pageID));
     106}
     107
     108WebPageProxy::WebPageProxy(PageClient* pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID)
    109109    : m_pageClient(pageClient)
    110110    , m_process(process)
    111     , m_context(context)
    112111    , m_pageGroup(pageGroup)
    113112    , m_mainFrame(0)
     
    181180WebProcessProxy* WebPageProxy::process() const
    182181{
    183     return m_context->process();
     182    return m_process.get();
    184183}
    185184
     
    248247    m_isValid = true;
    249248
    250     m_process = context()->relaunchProcessIfNecessary();
     249    m_process = m_process->context()->relaunchProcessIfNecessary();
    251250    process()->addExistingWebPage(this, m_pageID);
    252251
     
    531530
    532531    String newMimeType = mimeType;
    533     PluginInfoStore::Plugin plugin = context()->pluginInfoStore()->findPlugin(newMimeType, KURL());
     532    PluginInfoStore::Plugin plugin = m_process->context()->pluginInfoStore()->findPlugin(newMimeType, KURL());
    534533    if (!plugin.path.isNull())
    535534        return true;
     
    915914    if (action == PolicyDownload) {
    916915        // Create a download proxy.
    917         downloadID = context()->createDownloadProxy();
     916        downloadID = m_process->context()->createDownloadProxy();
    918917    }
    919918
     
    14661465
    14671466    RefPtr<APIObject> userData;
    1468     WebContextUserMessageDecoder messageDecoder(userData, context());
     1467    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    14691468    if (!arguments->decode(messageDecoder))
    14701469        return;
     
    14821481{
    14831482    RefPtr<APIObject> userData;
    1484     WebContextUserMessageDecoder messageDecoder(userData, context());
     1483    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    14851484    if (!arguments->decode(messageDecoder))
    14861485        return;
     
    14971496{
    14981497    RefPtr<APIObject> userData;
    1499     WebContextUserMessageDecoder messageDecoder(userData, context());
     1498    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    15001499    if (!arguments->decode(messageDecoder))
    15011500        return;
     
    15251524{
    15261525    RefPtr<APIObject> userData;
    1527     WebContextUserMessageDecoder messageDecoder(userData, context());
     1526    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    15281527    if (!arguments->decode(messageDecoder))
    15291528        return;
     
    15511550{
    15521551    RefPtr<APIObject> userData;
    1553     WebContextUserMessageDecoder messageDecoder(userData, context());
     1552    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    15541553    if (!arguments->decode(messageDecoder))
    15551554        return;
     
    15641563{
    15651564    RefPtr<APIObject> userData;
    1566     WebContextUserMessageDecoder messageDecoder(userData, context());
     1565    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    15671566    if (!arguments->decode(messageDecoder))
    15681567        return;
     
    15791578{
    15801579    RefPtr<APIObject> userData;
    1581     WebContextUserMessageDecoder messageDecoder(userData, context());
     1580    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    15821581    if (!arguments->decode(messageDecoder))
    15831582        return;
     
    15961595{
    15971596    RefPtr<APIObject> userData;
    1598     WebContextUserMessageDecoder messageDecoder(userData, context());
     1597    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    15991598    if (!arguments->decode(messageDecoder))
    16001599        return;
     
    16111610{
    16121611    RefPtr<APIObject> userData;
    1613     WebContextUserMessageDecoder messageDecoder(userData, context());
     1612    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    16141613    if (!arguments->decode(messageDecoder))
    16151614        return;
     
    16261625{
    16271626    RefPtr<APIObject> userData;
    1628     WebContextUserMessageDecoder messageDecoder(userData, context());
     1627    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    16291628    if (!arguments->decode(messageDecoder))
    16301629        return;
     
    16391638{
    16401639    RefPtr<APIObject> userData;
    1641     WebContextUserMessageDecoder messageDecoder(userData, context());
     1640    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    16421641    if (!arguments->decode(messageDecoder))
    16431642        return;
     
    16521651{
    16531652    RefPtr<APIObject> userData;
    1654     WebContextUserMessageDecoder messageDecoder(userData, context());
     1653    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    16551654    if (!arguments->decode(messageDecoder))
    16561655        return;
     
    16671666{
    16681667    RefPtr<APIObject> userData;
    1669     WebContextUserMessageDecoder messageDecoder(userData, context());
     1668    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    16701669    if (!arguments->decode(messageDecoder))
    16711670        return;
     
    16801679{
    16811680    RefPtr<APIObject> userData;
    1682     WebContextUserMessageDecoder messageDecoder(userData, context());
     1681    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    16831682    if (!arguments->decode(messageDecoder))
    16841683        return;
     
    17041703{
    17051704    RefPtr<APIObject> userData;
    1706     WebContextUserMessageDecoder messageDecoder(userData, context());
     1705    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    17071706    if (!arguments->decode(messageDecoder))
    17081707        return;
     
    17411740{
    17421741    RefPtr<APIObject> userData;
    1743     WebContextUserMessageDecoder messageDecoder(userData, context());
     1742    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    17441743    if (!arguments->decode(messageDecoder))
    17451744        return;
     
    17601759{
    17611760    RefPtr<APIObject> userData;
    1762     WebContextUserMessageDecoder messageDecoder(userData, context());
     1761    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    17631762    if (!arguments->decode(messageDecoder))
    17641763        return;
     
    17901789{
    17911790    RefPtr<APIObject> userData;
    1792     WebContextUserMessageDecoder messageDecoder(userData, context());
     1791    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    17931792    if (!arguments->decode(messageDecoder))
    17941793        return;
     
    18051804{
    18061805    RefPtr<APIObject> userData;
    1807     WebContextUserMessageDecoder messageDecoder(userData, context());
     1806    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    18081807    if (!arguments->decode(messageDecoder))
    18091808        return;
     
    19331932{
    19341933    RefPtr<APIObject> userData;
    1935     WebContextUserMessageDecoder messageDecoder(userData, context());
     1934    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    19361935    if (!arguments->decode(messageDecoder))
    19371936        return;
     
    22422241{
    22432242    RefPtr<APIObject> userData;
    2244     WebContextUserMessageDecoder messageDecoder(userData, context());
     2243    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
    22452244    if (!arguments->decode(messageDecoder))
    22462245        return;
     
    23102309#endif
    23112310    if (item.action() == ContextMenuItemTagDownloadImageToDisk) {
    2312         m_context->download(this, KURL(KURL(), m_activeContextMenuState.absoluteImageURLString));
     2311        m_process->context()->download(this, KURL(KURL(), m_activeContextMenuState.absoluteImageURLString));
    23132312        return;   
    23142313    }
    23152314    if (item.action() == ContextMenuItemTagDownloadLinkToDisk) {
    2316         m_context->download(this, KURL(KURL(), m_activeContextMenuState.absoluteLinkURLString));
     2315        m_process->context()->download(this, KURL(KURL(), m_activeContextMenuState.absoluteLinkURLString));
    23172316        return;
    23182317    }
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r83499 r83509  
    159159    static const Type APIType = TypePage;
    160160
    161     static PassRefPtr<WebPageProxy> create(PageClient*, PassRefPtr<WebProcessProxy>, WebContext*, WebPageGroup*, uint64_t pageID);
     161    static PassRefPtr<WebPageProxy> create(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
    162162    virtual ~WebPageProxy();
    163163
     
    422422
    423423    WebProcessProxy* process() const;
    424     WebContext* context() const { return m_context.get(); }
    425424
    426425    WebPageGroup* pageGroup() const { return m_pageGroup.get(); }
     
    496495 
    497496private:
    498     WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebContext*, WebPageGroup*, uint64_t pageID);
     497    WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
    499498
    500499    virtual Type type() const { return APIType; }
     
    714713    OwnPtr<DrawingAreaProxy> m_drawingArea;
    715714    RefPtr<WebProcessProxy> m_process;
    716     RefPtr<WebContext> m_context;
    717715    RefPtr<WebPageGroup> m_pageGroup;
    718716    RefPtr<WebFrameProxy> m_mainFrame;
  • trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp

    r83499 r83509  
    172172
    173173    unsigned pageID = generatePageID();
    174     RefPtr<WebPageProxy> webPage = WebPageProxy::create(pageClient, this, context, pageGroup, pageID);
     174    RefPtr<WebPageProxy> webPage = WebPageProxy::create(pageClient, this, pageGroup, pageID);
    175175    m_pageMap.set(pageID, webPage.get());
    176176    return webPage.release();
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r82622 r83509  
    3232#import "WKView.h"
    3333#import "WebPageProxy.h"
     34#import "WebProcessProxy.h"
    3435#import <WebKitSystemInterface.h>
    3536#import <WebCore/LocalizedStrings.h>
     
    8182    ASSERT(!m_inspectorView);
    8283
    83     m_inspectorView.adoptNS([[WKView alloc] initWithFrame:NSZeroRect contextRef:toAPI(page()->context()) pageGroupRef:toAPI(inspectorPageGroup())]);
     84    m_inspectorView.adoptNS([[WKView alloc] initWithFrame:NSZeroRect contextRef:toAPI(page()->process()->context()) pageGroupRef:toAPI(inspectorPageGroup())]);
    8485    ASSERT(m_inspectorView);
    8586
Note: See TracChangeset for help on using the changeset viewer.