blob: 07287ed6b026c337541b0efc614882ffaab9b586 [file] [log] [blame]
[email protected]6fc87e02011-12-20 19:18:451// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PPAPI_PROXY_PLUGIN_PROXY_DELEGATE_H_
6#define PPAPI_PROXY_PLUGIN_PROXY_DELEGATE_H_
7
8namespace ppapi {
9namespace proxy {
10
11class PPAPI_PROXY_EXPORT PluginProxyDelegate {
12 public:
13 virtual ~PluginProxyDelegate() {}
14
15 // Returns the WebKit forwarding object used to make calls into WebKit.
16 // Necessary only on the plugin side.
17 virtual WebKitForwarding* GetWebKitForwarding() = 0;
18
19 // Posts the given task to the WebKit thread associated with this plugin
20 // process. The WebKit thread should be lazily created if it does not
21 // exist yet.
22 virtual void PostToWebKitThread(const tracked_objects::Location& from_here,
23 const base::Closure& task) = 0;
24
25 // Sends the given message to the browser. Identical semantics to
26 // IPC::Message::Sender interface.
27 virtual bool SendToBrowser(IPC::Message* msg) = 0;
28
29 // Performs Windows-specific font caching in the browser for the given
30 // LOGFONTW. Does nothing on non-Windows platforms.
31 virtual void PreCacheFont(const void* logfontw) = 0;
32};
33
34} // namespace proxy
35} // namespace ppapi
36
37#endif // PPAPI_PROXY_PLUGIN_PROXY_DELEGATE_H_