[webkit-dev] A proposal for "Platform Mechanisms"

Geoffrey Garen ggaren at apple.com
Thu Jun 17 11:26:48 PDT 2010


> I propose that we create an abstract class, "PlatformMechanism" which acts as the starting point for accessing such functionality, something like:
> 
> class PlatformMechanism {
>  virtual ClipboardMechanism* clipboardMechanism() = 0;
>  virtual FileAccessMechanism* fileAccessMechanism() = 0;
>  virtual PluginMechanism* pluginMechanism() = 0;
> };

I think this would read better if you just got rid of the "Mechanism" suffix. It's such an abstract word that it's maybe meaningless.

You might still need something to distinguish this kind of clipboard from, say, the WebCore clipboard. For that, I suggest using the word "platform."

Here's a full set of rename examples:

class Platform {
 virtual PlatformClipboard* clipboard() = 0;
 virtual PlatformFileSystem* fileSystem() = 0;
 virtual PlatformPluginManager* pluginManager() = 0;
};

class PlatformPluginManager {
  virtual void refreshPlugins() = 0;
  virtual void getPluginInfo(Vector<PluginInfo>&) = 0;
};

Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100617/75e662c2/attachment.html>


More information about the webkit-dev mailing list