[Webkit-unassigned] [Bug 16814] Give plugin a chance to handle ActiveX objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 28 14:07:17 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=16814





------- Comment #13 from eric at webkit.org  2008-08-28 14:07 PDT -------
(In reply to comment #12)
> (From update of attachment 22688 [edit])
So I agree that this should move to a HashMap.  Your suggestion was that each
of these additions to the hashmap could be controlled by these ifdefs.

So it would look something like this: (pseudocode)

static inline void mapClassIdToServiceType(const String& classId, String&
serviceType)
{

   static HashMap<String, String, CaseFoldingHash>*
serviceTypeFallbackForClassId = 0;
   if (! serviceTypeFallbackForClassId) {
       serviceTypeFallbackForClassId = new HashMap<String, String,
CaseFoldingHash>;
#if ENABLE(PLATFORM_HANDLES_FLASH_CLASS_ID)
      
serviceTypeFallbackForClassId->add("D27CDB6E-AE6D-11cf-96B8-444553540000",
"application/x-shockwave-flash");
#endif
...
    }
    serviceType = serviceTypeFallbackForClassId->get(classId);
}

One problem with that approach is that the current version uses "contains" and
this would use "equals" for comparing the class-ids.  I'm not sure if we care?

I'm also not sure why we'd want to add 4 #ifdefs instead of just moving this
out into a separate file where platforms could decide these mappings at
runtime.  But I'm comfortable w/ either solution, really, just looking for
something long-term.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list