makefile 攻略.doc_第1页
makefile 攻略.doc_第2页
makefile 攻略.doc_第3页
makefile 攻略.doc_第4页
makefile 攻略.doc_第5页
已阅读5页,还剩21页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Makefile 攻略之platform/network/:Class AuthenticationChallengeBase: 权限证明基类。AuthenticationChallengeBase(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error);Class Credential: 证书。CredentialPersistence: CredentialPersistenceNone, CredentialPersistenceForSession,CredentialPersistencePermanent.CredentialType:CredentialTypePassword, CredentialTypeClientCertificate.Class FormData: 表格数据。Void appendData(const void * data, size_t);Void appendFile(const String& filename, bool shouldGenerateFile = false);.Vertor m_elements;Class FormDataBuilder:构造表格数据。Void setIsPostMethod(bool value);Void setIsMultiPartForm(bool value);Void setEncodingType(const String&value);Void setAcceptCharset(const String& value);Static Vertor generateUniqueBoundaryString()The RFC 2046 spec says the alphanumeric characters plus the following characters are legal for boundaries: ()+_,-./:=?。However the following characters, though legal, cause some sites to fail:(),./:=+。Note that our algorithm makes it twice as much likely for A or B to appear in the boundary string, because 0x41 and 0x42 are present in the below array twice.Class HTTPHeaderMap:HTTP头。Typedef Vectorstd:pair CrossThreadHTTPHeaderMapData;HTTPParsers.h:Bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivMeta, double& delay, String& url);Double parseDate(cosnt String&);Strng filenameFromHTTPContentDisposition(const String&);String extractMIMETypeFromMediaType(const String&);String extractCharsetFromMediaType(const String&);Class NetworkStateNotifier: 网络状态改变通知。Void NetworkStateNotifier:setNetworkStateChangedFunction(void (*function)();Void NetworkStateNotifier:netwrokStateChange(bool online);Void NetworkStateNotifier:networkTypeChange(Connection:ConnectionType type);Class ProtectionSpace: 保护空间,意思还不明朗。ProtectionSpaceServerType:ProtectionSpaceServerHTTP,ProtectionSpaceServerHTTPS,ProtectionSpaceServerFTP,ProtectionSpaceServerFTPS,ProtectionSpaceProxyHTTP,ProtectionSpaceProxyHTTPS,ProtectionSpaceProxyFTP,ProtectionSpaceProxySOCKS.Class ResourceHandle:资源操作。Static bool willLoadFromCache(ResourceRequest&, Frame*);Class ResourceHandleClient:资源操作客户端。Virtual void willSendRequest(ResourceHandle*, ResourceRequeset&, const ResourceResponse & /* redirectResponse */);Virtual void didSendData(ResourceHandle*, unsigned long /*bytesSent*/, unsigned long long /*totalBytesToBeSent*/);virtual void didReceiveResponse(ResourceHandle*, const ResourceResponse&); virtual void didReceiveData(ResourceHandle*, const char*, int, int /*lengthReceived*/); virtual void didFinishLoading(ResourceHandle*); virtual void didFail(ResourceHandle*, const ResourceError&); virtual void wasBlocked(ResourceHandle*); virtual void cannotShowURL(ResourceHandle*); virtual void willCacheResponse(ResourceHandle*, CacheStoragePolicy&); virtual bool shouldUseCredentialStorage(ResourceHandle*); virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&); virtual void didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&); virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge&);class ResourceRequestBase:资源请求基类。TargetType:TargetIsMainFrame,TargetIsSubframe,TargetIsSubresource,TargetIsStyleSheet,TargetIsScript,TargetIsFontResource,TargetIsImage,TargetIsObject,TargetIsMedia.Class ResourceResponseBase:HTTP响应基类。Class ResourceLoaderAndroid: Android资源加载基类。Virtual void cancel() = 0;Virtual void downloadFile() = 0;Virtual void pauseLoad() = 0;/ANDROID TODO:This needs to be upstreamed.Static bool willLoadFromCache();/Call to java to find out if this URL is in the cache.ResourceRequestAndroid.cpp:Unsigned initializeMaximumHTTPConnectionCountPerHost()/ This is used by the loader to control the number of parallel load requests. Our java frame work has 4 threads that can each pipeline up to 5 requests.Use 20 as a maximum number.Return 20;Makefile攻略之loader/:Class Cache:缓存类保存web派生资源:图片,脚本,表单等;Struct Statistics TypeStatistic images;TypeStatistic cssStyleSheets;TypeStatistic scripts;#if ENABLE(XSLT)TypeStatistic xslStyleSheets;#endif#if ENABLE(XBL)TypeStatistic xblDocs;#endifTypeStatistic fonts;Static const int cDefaultCacheCapacity = 8192 * 1024;Static const double cMinDelayBeforeLiveDecodedPrune = 1; /SecondsStatic const float cTargetPrunePercentage = .95f; /Percentage of capacity toward which we prune, to avoid immediately pruning again.Static const double cDefaultDecodeDataDeletionInterval = 0;Class CachedCSSStyleSheet、CachedFont、CachedImage、CacheScript、CachedXBLDocument、CachedXSLStyleSheet: 派生资源继承自CachedResource.Const String sheetText(bool enforceMIMEType = true, bool * hasValidMIMEType = 0) const;Virtual void didAddClient(CachedResourceClient *);Virtual void allClientsRemoved();Virtual void setEncoding(const String &);Virtual Strng encoding() const;Virtual void data(PassRefPtr data, bool allDataReceived);Virtual bool schedule() const return true;Void checkNotify();Class CachedResource:派生资源基类。Enum Type imageResource,CSSStyleSheet,Script,FontResource,#ifENABLE(XSLT)XSLStyleSheet,#ifENABLE(XBL)XBL#endif;Enum StatusNotCached,/ this URL is not cachedUnknown,/ let cache decide what to do with itNew,/ inserting new itemPending,/ only partially loadedCached/ regular case;DocLoader * m_docLoader;/ only non-0 for resources that are not in the cache.CrossOriginAccessControl.cpp: Bool isOnAccessControlSimpleRequestMethodWhitelist(const String& method);Bool isOnAccessControlSimpleRequestHeaderWhitelist(const String&name, const String& value);Bool isSimpleCrossOriginAccessRequeset(const String& method, const HTTPHeaderMap & headerMap);Typedef HashSet HTTPHeaderSet;Static HTTPHeaderSet * createAllowedCrossOriginResponseHeadersSet();Bool isOnAccessControlResponseHeaderWhitelist(const String& name);Bool passesAccessControlCheck(const ResourceResponse & response, bool includeCredentials, SecurityOrigin * securityOrigin);Class DocLoader:派生资源加载类。Enum CachePolicy CachePolicyCache,CachePolicyVerify,CachePolicyRevalidate,CachePolicyReload,CachePolicyAllowStale;CachedImage * requestImage(const String& url);CachedCSSStyleSheet * requestCSSStyleSheet(const String& url, const String& charset);CachedScript * requestScript(const String & url, const String& charset);CachedFont * requestFont(const String & url);Class DocumentLoader:Frame * m_frame;RefPtr m_mainResourceLoader;ResourceLoaderSet m_subresourceLoaders;ResourceLoaderSet m_multipartSubresourceLoaders;ResourceLoaderSet m_plugInStreamLoaders;RefPtr m_mainResourceData;ResourceRequestm_originalRequest;ResourceRequest m_originalRequesetCopy; / A copy of the original request used to create the data source. We have to copy the request because requests are mutable.ResourceRequestm_requeset;ResourceResponsem_response;NavigationActionm_triggeringAction;/ The action that triggered loading we keep this around for the benefit of the various policy handlers.ResourceRequestm_lastCheckedRequest;/ The last requeset that we chedked click policy for kept around so we can avoid asking again needlessly.ResponseVectorm_responses./ We retain all the received responses so we can play back the WebResourceLoadDelegate messages if the item is loaded from the page cache.Class DocumentThreadableLoader:Static void loadResourceSynchronously(Document *, const ResourceRequest&, ThreadableLoaderClient &, const ThreadableLoaderOption&);Virtual void willSendRequest(SubresourceLoader *, ResourceRequest *, const ResourceResponse & redirectResponse);Virtual void didSendData(SubresourceLoader *, unsigned long long bytesSent, unsigned long long totalBytesToBeSent);Virtual void didReceiveResponse(SubresourceLoader *, const ResourceResponse &);Virtual void didReceiveData(SubresourceLoader *,const char *, int lengthReceived);Virtual void didFail(SubresourceLoader*, const ResourceError &);ThreadableLoaderClient * m_client;EmptyClients.h: This file was first created for SVGImage as it had no way to access the current Page (nor should it, since Images are not tied to a page).Class FormState:Enum FormSubmissionTriggerSubmittedByJavaScript,NotSubmittedByJavaScript;FormState(PassRefPtr, StringPairVector & textFieldValuesToAdop, PassRefPtr, FormSubmissionTrigger);RefPtr m_form;StringPairVectorm_textFieldValues;RefPtrm_sourceFrame;FormSubmissionTriggerm_mformSubmissionTrigger;Class FrameLoader:Frame * m_frame;FrameLoaderClient * m_client;Mutable PolicyCheckerm_policyChecker;Mutable HistoryControllerm_history;Mutable ResourceLoadNotifierm_notifer;FrameStatem_state;FrameLoadTypem_loadType;/ Document loaders for the three phases of frame loading. Note that while a new request is being loaded, the old document loader my still be referenced. EG while a new request is in the “policy” state, the old document loader may be consulted in particular as it makes sense to imply certain settings on the new loader.RefPtr m_documentLoader;RefPtr m_provisionalDocumentLoader;RefPtrm_policyDocumentLoader;RefPtrm_decoder;FrameLoaderClient.h/FrameLoaderTypes.h:Enum FrameStateFrameStateProvisional,/ This state indicates we are ready to commit to a page, which means the view will transition to use the new data source.FrameStateCommittedPage,FrameStateComplete;Enum PolicyAction PolicyUse, PolicyDownload, PolicyIgnore;Enum FrameLoadTypeFrameLoadTypeStandard,FrameLoadTypeBack,FrameLoadTypeForward,FrameLoadTypeIndexedBackForward,/ a multi-item hop in the backForward listFrameLoadTypeReload,FrameLoadTypeSame = FrameLoadTypeReload + 2, / user loads same URL againFrameLoadTypeRedirectWithLockedBackForwardList,FrameLoadTypeReplace,FrameLoadTypeReloadFromOrigin,FrameLoadTypeBackWMLDeckNotAccessible.;Enum NavigationType NavigationTypeLinkClicked,NavigationTypeFormSubmitted,NavigationTypeBackForward,NavigationTypeReload,NavigationTypeFormResubmitted,NavigationTypeOther;Enum DatabasePolicy DatabasePolicyStop,/ The database thread should be stopped and database connections closed.DatabasePolicyContinue;Enum ObjectContentTypeObjectContentNone,ObjectContentImage,ObjectContentFrame,ObjectContentNetscapePlugin,ObjectContentOtherPlugin;Enum UnloadEventPolicy UnloadEventPolicyNone,UnloadEventPolicyUnloadOnly,UnloadEventPolicyUnloadAndPageHide.;Enum ReferrerPolicy SendReferrer,NoReferrer;Enum SandboxFlagSandboxNone = 0,SandboxNavigation = 1,SandboxPlugins = 1 1,SandboxOrigin = 1 2,SandboxForms = 1 3,SandboxScripts = 1 4,SandboxAll = -1 / Mask with all bits set to 1.;Enum SecurityCheckPolicy SkipSecurityCheck,doSecurityCheck;Class HistoryController:Frame * m_frame;RefPtrm_currentItem;RefPtrm_previousItem;RefPtrm_provisionalItem;Class ImageDocument/ImageTokenizer:Virtual void ImageTokenizer:write(const SegmentedString&, bool appendData);Virtual void ImageTokenizer:finish();Virtual bool ImageTokenizer:isWaitingForScripts() const;Virtual bool ImageTokenizer:wantsRawData() const;Virtual bool ImageTokenizer:writeRawData(const char * data, int len);Void ImageDocument:CreateDocumentStructure()ExceptionCodeec;RefPtr rootElement = Document:createElement(htmlTag, false);appendChild(rootElement, ec);RefPtr body = Document:createElement(bodyTag, false);Body-setAttribute(styleAttr, “margin: 0px;”);rootElement-appendChild(body, ec);RefPtr imageElement = new ImageDocumentElement(this);imageElement-setAttribute(styleAttr, “-webkit-user-select:none”);imageElement-setLoadManually(true);imageElement-setSrc(url().string();body-appendChild(imageElement, ec);if(shouldShrinkToFit()/ Add event listenersRefPtr listener = ImageEventListener:create(this);If(DOMWindow * domWindow = this-domWindow()domWindow-addEventListener(“resize”, listener, false);imageElement-addEventListener(“click”, listener.release(), false);M_imageElement = imageElement.get();Class ImageLoader: public CachedResourceClientVoid ImageLoader:updateRenderer()If(RenderObject * renderer = m_element-renderer()If(!renderer-isImage() & !renderer-isVideo()Return;RenderImage * imageRenderer = toRenderImage(renderer);/ Only update the renderer if it doesnt have an image or if what we have is a cpmplete image. This prevents flickering in the case where a dynamic change is happening between two images.CachedImage * cachedImage = imageRenderer-cachedImage();If(m_image != cachedImage & (m_imageComplete | !imageRenderer-cachedImage()imageRenderer-setCachedImage(m_image.get();Class Loader: public NoncopyableEnum Priority Low, Medium, High;Class HostTypedef Deque RequestQueue;RequestQueue m_requestsPendingHigh +;Typedef HashMapRefPtr, Request * RequestMap;RequestMapm_requestsLoading;Const AtomicStringm_name;Const int m_maxRequestsInFlight;Int m_numResourcesProcessing;Int m_nonCachedRequestsInFlight;Typedef HashMapAtomicStringImpl*, RefPtrHostMap;HostMapm_hosts;Class MainResourceLoader: public ResourceLoadervirtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);virtual void didReceiveResponse(const ResourceResponse&);virtual void didReceiveData(const char*, int, long long lengthReceived, bool allAtOnce);virtual void didFinishLoading();virtual void didFail(const ResourceError&);class NetscapePlugInStreamLoader: public ResourceLoaderNetscapePlugInStreamLoaderClient * m_client;virtual void didReceiveResponse(NetscapePlugInStreamLoader*, const ResourceResponse&) = 0;virtual void didReceiveData(NetscapePlugInStreamLoader*, const char*, int) = 0;virtual void didFail(NetscapePlugInStreamLoader*, const ResourceError&) = 0;virtual void didFinishLoading(NetscapePlugInStreamLoader*) virtual bool wantsAllStreams() const return false; Class PolicyCallback:Typedef void (*NavigationPolicyDecisionFunction)(void* argument, const ResourceRequest &, PassRefPtr, bool shouldContinue);Typedef void (*NewWindowPolicyDecisionFunction)(void *argument, const ResourceRequest&, PassRefPtr, const String& frameName, bool shouldContinue);Typedef void (*ContentPolicyDecisionFunction)(void * argument, PolicyAction);NavigationPolicyDecisionFunctionm_navigationFunction;NewWindowPolicyDecisionFunctionm_newWindowFunction;ContentPolicyDecisionFunctionm_contentFunction;Void *m_argument;Class PolicyChecker:Void checkNavigationPolicy(const ResourceRequest&, DocumentLoader *, PassRefPtr, NavigationPolicyDecisionFunction, void * argument);Void checkNewWindowPolicy(const NavigationAction&, NewWindowPolicyDecisionFunction, const ResourceRequest&, PassRefPtr, const String& frameName, void * argument);Void checkContentPolicy(const String& MIMEType, ContentPolicyDecisionFunction, void * argument);Frame * m_frame;/ This identifies the type of navigation action which prompted this load. Note that Webkit conveys this value as the WebActionNavigationTypeKey value on navigation action delegate callbacks.FrameLoadTypem_loadType;PolicyCallBackm_callback;Class ProgressTracker:Unsigned long createUniqueIdentifier();Double estimatedProgress() const;Void progressStarted(Frame*);Void progressCompleted(Frame*);Void incrementProgress(unsigned long identifier, const char *, int);Void finalProgressComplete();/ Always start progress at initialProgressValue. This helps provide feedback as soon as a load start.Static const doubleinitialProgressValue = 0.1;/ Similarly, always leave space at the end. This helps show the user that were not done until were done.Static const double finalProgressValue = 0.9;Static const int progressItemDefaultEstimatedLength = 1024 * 16;Class RedirectScheduler:Void scheduleRedirect(double delay, const String& url);Void scheduleLocationChange(const String& url, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool userGesture = false);Void scheduleFormSubmission(const FrameLoadRequest&, bool lockHistory, PassRefPtr, PassRefPtr);Void scheduleRefresh(bool userGesture = false);Void scheduleHistoryNavigation(int steps);Class Request:Vectorm_buffer;CachedResource * m_object;DocLoader *m_docLoader;Boolm_incremental;Boolm_multipart;Class ResourceLoader: pretected ResourceHandleClientRefPtrm_handle;RefPtrm_frame;RefPtrm_documentLoader;ResourceResponsem_response;ResourceRequestm_request;RefPtrm_resourceData;Class SubresourceLoader: public ResourceLoadervirtual void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);virtual void didRec

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论