diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 17:51:01 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 17:51:01 +0000 |
commit | 7d99b70336a0cfd17c433386a3de607385981eae (patch) | |
tree | ce55c4d223a866ca04fea068a9a2594c22315e1f /webkit/glue/webkit_glue.h | |
parent | 219d310caa54c41347ae5cf923aec8b768e0638f (diff) | |
download | chromium_src-7d99b70336a0cfd17c433386a3de607385981eae.zip chromium_src-7d99b70336a0cfd17c433386a3de607385981eae.tar.gz chromium_src-7d99b70336a0cfd17c433386a3de607385981eae.tar.bz2 |
Revert r11118 :(
TBR=dglazkov
Review URL: http://codereview.chromium.org/39267
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.h')
-rw-r--r-- | webkit/glue/webkit_glue.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 7b79ff9..0ddee38 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -29,6 +29,27 @@ namespace WebKit { class WebString; } +#if defined(OS_MACOSX) +// TODO(port): +// When the code (that got compiled) only used SkBitmap*, it was OK to +// make a GlueBitmap be a SkBitmap* or CGImageRef. However, lots of +// other chrome files that need to be brought in (such as +// chrome/viewas/tree_model.h) uses SkBitmap (as a non-pointer). +// Although *(GlueBitmap) makes sense as *(SkBitmap*), it does not +// make sense as *(CGImageRef). +typedef struct CGImage* CGImageRef; +class GlueBitmap { + public: + explicit GlueBitmap(CGImageRef ref) : ref_(ref) { } + GlueBitmap() : ref_(0) { } + operator CGImageRef() { return ref_; } + private: + CGImageRef ref_; +}; +#else +typedef SkBitmap GlueBitmap; +#endif + namespace webkit_glue { struct ScreenInfo; @@ -141,6 +162,15 @@ string16 GetLocalizedString(int message_id); // specified as BINDATA in the relevant .rc file. std::string GetDataResource(int resource_id); +// Returns a GlueBitmap for a resource. This resource must have been +// specified as BINDATA in the relevant .rc file. +#if defined(OS_MACOSX) +// TODO(port) +SkBitmap* GetBitmapResource(int resource_id); +#else +GlueBitmap* GetBitmapResource(int resource_id); +#endif + #if defined(OS_WIN) // Loads and returns a cursor. HCURSOR LoadCursor(int cursor_id); @@ -217,6 +247,14 @@ bool FindProxyForUrl(const GURL& url, std::string* proxy_list); // the form language-country (e.g., en-US or pt-BR). std::wstring GetWebKitLocale(); +// Returns the hash for the given canonicalized URL for use in visited link +// coloring. +uint64 VisitedLinkHash(const char* canonical_url, size_t length); + +// Returns whether the given link hash is in the user's history. The hash must +// have been generated by calling VisitedLinkHash(). +bool IsLinkVisited(uint64 link_hash); + // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- |