plugin_proxy_delegate.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 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 8#include <string> 9 10namespace IPC { 11class Sender; 12} 13 14namespace ppapi { 15namespace proxy { 16 17class PPAPI_PROXY_EXPORT PluginProxyDelegate { 18 public: 19 virtual ~PluginProxyDelegate() {} 20 21 // Sends the given message to the browser. Identical semantics to IPC::Sender 22 // interface. New code should use GetBrowserSender instead. 23 // TODO(brettw) remove this. 24 virtual bool SendToBrowser(IPC::Message* msg) = 0; 25 26 // Returns the channel for sending to the browser. 27 virtual IPC::Sender* GetBrowserSender() = 0; 28 29 // Returns the language code of the current UI language. 30 virtual std::string GetUILanguage() = 0; 31 32 // Performs Windows-specific font caching in the browser for the given 33 // LOGFONTW. Does nothing on non-Windows platforms. 34 virtual void PreCacheFont(const void* logfontw) = 0; 35 36 // Sets the active url which is reported by breakpad. 37 virtual void SetActiveURL(const std::string& url) = 0; 38}; 39 40} // namespace proxy 41} // namespace ppapi 42 43#endif // PPAPI_PROXY_PLUGIN_PROXY_DELEGATE_H_ 44