[email protected] | 72a1072 | 2012-06-27 19:30:58 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 6fc87e0 | 2011-12-20 19:18:45 | [diff] [blame] | 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 | |||||
[email protected] | 2306303a | 2012-06-11 18:10:37 | [diff] [blame] | 8 | #include <string> |
9 | |||||
[email protected] | 93df81e | 2012-08-10 22:22:46 | [diff] [blame] | 10 | namespace IPC { |
11 | class Sender; | ||||
12 | } | ||||
13 | |||||
[email protected] | 6fc87e0 | 2011-12-20 19:18:45 | [diff] [blame] | 14 | namespace ppapi { |
15 | namespace proxy { | ||||
16 | |||||
17 | class PPAPI_PROXY_EXPORT PluginProxyDelegate { | ||||
18 | public: | ||||
19 | virtual ~PluginProxyDelegate() {} | ||||
20 | |||||
[email protected] | 93df81e | 2012-08-10 22:22:46 | [diff] [blame] | 21 | // Returns the channel for sending to the browser. |
[email protected] | e34e809 | 2012-11-27 23:01:26 | [diff] [blame] | 22 | // Note: The returned sender must be thread-safe. It might be used while the |
23 | // proxy lock is not acquired. Please see the implementation of | ||||
24 | // PluginGlobals::BrowserSender. | ||||
[email protected] | 93df81e | 2012-08-10 22:22:46 | [diff] [blame] | 25 | virtual IPC::Sender* GetBrowserSender() = 0; |
26 | |||||
[email protected] | 2306303a | 2012-06-11 18:10:37 | [diff] [blame] | 27 | // Returns the language code of the current UI language. |
28 | virtual std::string GetUILanguage() = 0; | ||||
29 | |||||
[email protected] | 6fc87e0 | 2011-12-20 19:18:45 | [diff] [blame] | 30 | // Performs Windows-specific font caching in the browser for the given |
31 | // LOGFONTW. Does nothing on non-Windows platforms. | ||||
[email protected] | e34e809 | 2012-11-27 23:01:26 | [diff] [blame] | 32 | // Note: This method must be thread-safe. |
[email protected] | 6fc87e0 | 2011-12-20 19:18:45 | [diff] [blame] | 33 | virtual void PreCacheFont(const void* logfontw) = 0; |
[email protected] | 72a1072 | 2012-06-27 19:30:58 | [diff] [blame] | 34 | |
35 | // Sets the active url which is reported by breakpad. | ||||
36 | virtual void SetActiveURL(const std::string& url) = 0; | ||||
[email protected] | 1d14806 | 2013-07-25 20:25:45 | [diff] [blame] | 37 | |
38 | // Validates the font description, and uses it to create a | ||||
39 | // BrowserFontResource_Trusted resource. | ||||
40 | virtual PP_Resource CreateBrowserFont( | ||||
41 | Connection connection, | ||||
42 | PP_Instance instance, | ||||
43 | const PP_BrowserFont_Trusted_Description& desc, | ||||
44 | const Preferences& prefs) = 0; | ||||
[email protected] | 6fc87e0 | 2011-12-20 19:18:45 | [diff] [blame] | 45 | }; |
46 | |||||
47 | } // namespace proxy | ||||
48 | } // namespace ppapi | ||||
49 | |||||
50 | #endif // PPAPI_PROXY_PLUGIN_PROXY_DELEGATE_H_ |