Changeset 159983 in webkit


Ignore:
Timestamp:
Dec 2, 2013 4:54:12 PM (10 years ago)
Author:
andersca@apple.com
Message:

Move WKContext clients to separate files
https://bugs.webkit.org/show_bug.cgi?id=125121

Reviewed by Andreas Kling.

  • UIProcess/API/C/WKContext.h:
  • UIProcess/API/C/WKContextConnectionClient.h: Added.
  • UIProcess/API/C/WKContextDownloadClient.h: Added.
  • UIProcess/API/C/WKContextHistoryClient.h: Added.
  • UIProcess/API/C/WKContextInjectedBundleClient.h: Added.
  • WebKit2.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebKit2
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r159982 r159983  
     12013-12-02  Anders Carlsson  <andersca@apple.com>
     2
     3        Move WKContext clients to separate files
     4        https://bugs.webkit.org/show_bug.cgi?id=125121
     5
     6        Reviewed by Andreas Kling.
     7
     8        * UIProcess/API/C/WKContext.h:
     9        * UIProcess/API/C/WKContextConnectionClient.h: Added.
     10        * UIProcess/API/C/WKContextDownloadClient.h: Added.
     11        * UIProcess/API/C/WKContextHistoryClient.h: Added.
     12        * UIProcess/API/C/WKContextInjectedBundleClient.h: Added.
     13        * WebKit2.xcodeproj/project.pbxproj:
     14
    1152013-12-02  Sam Weinig  <sam@webkit.org>
    216
  • trunk/Source/WebKit2/UIProcess/API/C/WKContext.h

    r157595 r159983  
    2828
    2929#include <WebKit2/WKBase.h>
     30#include <WebKit2/WKContextConnectionClient.h>
     31#include <WebKit2/WKContextDownloadClient.h>
     32#include <WebKit2/WKContextHistoryClient.h>
     33#include <WebKit2/WKContextInjectedBundleClient.h>
    3034
    3135#ifdef __cplusplus
     
    5761
    5862enum { kWKContextClientCurrentVersion = 0 };
    59 
    60 // Injected Bundle Client
    61 typedef void (*WKContextDidReceiveMessageFromInjectedBundleCallback)(WKContextRef page, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo);
    62 typedef void (*WKContextDidReceiveSynchronousMessageFromInjectedBundleCallback)(WKContextRef page, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData, const void *clientInfo);
    63 typedef WKTypeRef (*WKContextGetInjectedBundleInitializationUserDataCallback)(WKContextRef context, const void *clientInfo);
    64 
    65 struct WKContextInjectedBundleClient {
    66     int                                                                 version;
    67     const void *                                                        clientInfo;
    68 
    69     // Version 0.
    70     WKContextDidReceiveMessageFromInjectedBundleCallback                didReceiveMessageFromInjectedBundle;
    71     WKContextDidReceiveSynchronousMessageFromInjectedBundleCallback     didReceiveSynchronousMessageFromInjectedBundle;
    72 
    73     // Version 1.
    74     WKContextGetInjectedBundleInitializationUserDataCallback            getInjectedBundleInitializationUserData;
    75 };
    76 typedef struct WKContextInjectedBundleClient WKContextInjectedBundleClient;
    77 
    78 enum { kWKContextInjectedBundleClientCurrentVersion = 1 };
    79 
    80 // History Client
    81 typedef void (*WKContextDidNavigateWithNavigationDataCallback)(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void *clientInfo);
    82 typedef void (*WKContextDidPerformClientRedirectCallback)(WKContextRef context, WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef frame, const void *clientInfo);
    83 typedef void (*WKContextDidPerformServerRedirectCallback)(WKContextRef context, WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef frame, const void *clientInfo);
    84 typedef void (*WKContextDidUpdateHistoryTitleCallback)(WKContextRef context, WKPageRef page, WKStringRef title, WKURLRef URL, WKFrameRef frame, const void *clientInfo);
    85 typedef void (*WKContextPopulateVisitedLinksCallback)(WKContextRef context, const void *clientInfo);
    86 
    87 struct WKContextHistoryClient {
    88     int                                                                 version;
    89     const void *                                                        clientInfo;
    90     WKContextDidNavigateWithNavigationDataCallback                      didNavigateWithNavigationData;
    91     WKContextDidPerformClientRedirectCallback                           didPerformClientRedirect;
    92     WKContextDidPerformServerRedirectCallback                           didPerformServerRedirect;
    93     WKContextDidUpdateHistoryTitleCallback                              didUpdateHistoryTitle;
    94     WKContextPopulateVisitedLinksCallback                               populateVisitedLinks;
    95 };
    96 typedef struct WKContextHistoryClient WKContextHistoryClient;
    97 
    98 enum { kWKContextHistoryClientCurrentVersion = 0 };
    99 
    100 // Download Client
    101 typedef void (*WKContextDownloadDidStartCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
    102 typedef void (*WKContextDownloadDidReceiveAuthenticationChallengeCallback)(WKContextRef context, WKDownloadRef download, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo);
    103 typedef void (*WKContextDownloadDidReceiveResponseCallback)(WKContextRef context, WKDownloadRef download, WKURLResponseRef response, const void *clientInfo);
    104 typedef void (*WKContextDownloadDidReceiveDataCallback)(WKContextRef context, WKDownloadRef download, uint64_t length, const void *clientInfo);
    105 typedef bool (*WKContextDownloadShouldDecodeSourceDataOfMIMETypeCallback)(WKContextRef context, WKDownloadRef download, WKStringRef mimeType, const void *clientInfo);
    106 typedef WKStringRef (*WKContextDownloadDecideDestinationWithSuggestedFilenameCallback)(WKContextRef context, WKDownloadRef download, WKStringRef filename, bool* allowOverwrite, const void *clientInfo);
    107 typedef void (*WKContextDownloadDidCreateDestinationCallback)(WKContextRef context, WKDownloadRef download, WKStringRef path, const void *clientInfo);
    108 typedef void (*WKContextDownloadDidFinishCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
    109 typedef void (*WKContextDownloadDidFailCallback)(WKContextRef context, WKDownloadRef download, WKErrorRef error, const void *clientInfo);
    110 typedef void (*WKContextDownloadDidCancel)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
    111 typedef void (*WKContextDownloadProcessDidCrashCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
    112 
    113 struct WKContextDownloadClient {
    114     int                                                                 version;
    115     const void *                                                        clientInfo;
    116     WKContextDownloadDidStartCallback                                   didStart;
    117     WKContextDownloadDidReceiveAuthenticationChallengeCallback          didReceiveAuthenticationChallenge;
    118     WKContextDownloadDidReceiveResponseCallback                         didReceiveResponse;
    119     WKContextDownloadDidReceiveDataCallback                             didReceiveData;
    120     WKContextDownloadShouldDecodeSourceDataOfMIMETypeCallback           shouldDecodeSourceDataOfMIMEType;
    121     WKContextDownloadDecideDestinationWithSuggestedFilenameCallback     decideDestinationWithSuggestedFilename;
    122     WKContextDownloadDidCreateDestinationCallback                       didCreateDestination;
    123     WKContextDownloadDidFinishCallback                                  didFinish;
    124     WKContextDownloadDidFailCallback                                    didFail;
    125     WKContextDownloadDidCancel                                          didCancel;
    126     WKContextDownloadProcessDidCrashCallback                            processDidCrash;
    127 };
    128 typedef struct WKContextDownloadClient WKContextDownloadClient;
    129 
    130 enum { kWKContextDownloadClientCurrentVersion = 0 };
    131 
    132 // Connection Client
    133 typedef void (*WKContextDidCreateConnection)(WKContextRef context, WKConnectionRef connection, const void* clientInfo);
    134 
    135 struct WKContextConnectionClient {
    136     int                                                                 version;
    137     const void *                                                        clientInfo;
    138     WKContextDidCreateConnection                                        didCreateConnection;
    139 };
    140 typedef struct WKContextConnectionClient WKContextConnectionClient;
    141 
    142 enum { kWKContextConnectionClientCurrentVersion = 0 };
    14363
    14464enum {
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r159976 r159983  
    137137                1A3EED12161A53D600AEB4F5 /* MessageReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */; };
    138138                1A433F0D113C53DD00FACDE9 /* WebErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A433F0C113C53DD00FACDE9 /* WebErrors.h */; };
     139                1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
     140                1A445BA1184D5FC1004B3414 /* WKContextHistoryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445BA0184D5FC1004B3414 /* WKContextHistoryClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
     141                1A445BA3184D5FCF004B3414 /* WKContextDownloadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445BA2184D5FCF004B3414 /* WKContextDownloadClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
     142                1A445BA5184D5FDA004B3414 /* WKContextConnectionClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445BA4184D5FDA004B3414 /* WKContextConnectionClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
    139143                1A44B95716B737AA00B7BBD8 /* StorageNamespaceImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A17635416B1D5D000D88FD6 /* StorageNamespaceImpl.cpp */; };
    140144                1A44B95B16B73F9F00B7BBD8 /* StorageManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A44B95916B73F9F00B7BBD8 /* StorageManager.cpp */; };
     
    16321636                1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageReceiver.h; sourceTree = "<group>"; };
    16331637                1A433F0C113C53DD00FACDE9 /* WebErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebErrors.h; sourceTree = "<group>"; };
     1638                1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextInjectedBundleClient.h; sourceTree = "<group>"; };
     1639                1A445BA0184D5FC1004B3414 /* WKContextHistoryClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextHistoryClient.h; sourceTree = "<group>"; };
     1640                1A445BA2184D5FCF004B3414 /* WKContextDownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextDownloadClient.h; sourceTree = "<group>"; };
     1641                1A445BA4184D5FDA004B3414 /* WKContextConnectionClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextConnectionClient.h; sourceTree = "<group>"; };
    16341642                1A44B95916B73F9F00B7BBD8 /* StorageManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageManager.cpp; sourceTree = "<group>"; };
    16351643                1A44B95A16B73F9F00B7BBD8 /* StorageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageManager.h; sourceTree = "<group>"; };
     
    45554563                                BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
    45564564                                BCB9E2491120E15C00A137E0 /* WKContext.h */,
     4565                                1A445BA4184D5FDA004B3414 /* WKContextConnectionClient.h */,
     4566                                1A445BA2184D5FCF004B3414 /* WKContextDownloadClient.h */,
     4567                                1A445BA0184D5FC1004B3414 /* WKContextHistoryClient.h */,
     4568                                1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */,
    45574569                                BCC938E01180DE440085E5FE /* WKContextPrivate.h */,
    45584570                                330934581315B9980097A7BC /* WKCookieManager.cpp */,
     
    55715583                                E1A31732134CEA6C007C9A4F /* AttributedString.h in Headers */,
    55725584                                512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */,
     5585                                1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */,
    55735586                                512F589912A8838800629530 /* AuthenticationDecisionListener.h in Headers */,
    55745587                                518E8EF916B2091C00E91429 /* AuthenticationManager.h in Headers */,
     
    56485661                                E1EE53E311F8CFC000CCBEE4 /* InjectedBundlePageEditorClient.h in Headers */,
    56495662                                BC14E10A120B905E00826C0C /* InjectedBundlePageFormClient.h in Headers */,
     5663                                1A445BA5184D5FDA004B3414 /* WKContextConnectionClient.h in Headers */,
    56505664                                CD5C66A1134B9D38004FE2A8 /* InjectedBundlePageFullScreenClient.h in Headers */,
    56515665                                BCA8C6A911E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h in Headers */,
     
    56985712                                31A2EC5614899C0900810D71 /* NotificationPermissionRequest.h in Headers */,
    56995713                                3131261F148FF82C00BA2A39 /* NotificationPermissionRequestManager.h in Headers */,
     5714                                1A445BA1184D5FC1004B3414 /* WKContextHistoryClient.h in Headers */,
    57005715                                31A2EC521489981900810D71 /* NotificationPermissionRequestManagerProxy.h in Headers */,
    57015716                                1AB474E0184D446A0051B622 /* WKBundlePageEditorClient.h in Headers */,
     
    58555870                                F62A76B712B1B25F0005F1B6 /* WebDatabaseManagerMessages.h in Headers */,
    58565871                                F62A765D12B1ABC30005F1B6 /* WebDatabaseManagerProxy.h in Headers */,
     5872                                1A445BA3184D5FCF004B3414 /* WKContextDownloadClient.h in Headers */,
    58575873                                BCAC111F12C92C1F00B08EEE /* WebDatabaseManagerProxyClient.h in Headers */,
    58585874                                F62A76B912B1B25F0005F1B6 /* WebDatabaseManagerProxyMessages.h in Headers */,
Note: See TracChangeset for help on using the changeset viewer.