summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/plugin_globals.h
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 23:01:26 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 23:01:26 +0000
commite34e809c705cf1304403d604d016c57523b06230 (patch)
treeae4df1becb5c3ae4809804dd3e6d680bbc787096 /ppapi/proxy/plugin_globals.h
parentf059ed0237af7e59afe40eec778937919417fa1e (diff)
downloadchromium_src-e34e809c705cf1304403d604d016c57523b06230.zip
chromium_src-e34e809c705cf1304403d604d016c57523b06230.tar.gz
chromium_src-e34e809c705cf1304403d604d016c57523b06230.tar.bz2
Pepper proxy: make the browser sender handle the proxy lock properly.
- unlock the pepper proxy lock when sending sync messages to the browser; - remove the SendToBrowser() method from the PluginProxyDelegate; TEST=None BUG=161286 Review URL: https://chromiumcodereview.appspot.com/11299147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_globals.h')
-rw-r--r--ppapi/proxy/plugin_globals.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/ppapi/proxy/plugin_globals.h b/ppapi/proxy/plugin_globals.h
index c8bf113..0a79891 100644
--- a/ppapi/proxy/plugin_globals.h
+++ b/ppapi/proxy/plugin_globals.h
@@ -5,6 +5,8 @@
#ifndef PPAPI_PROXY_PLUGIN_GLOBALS_H_
#define PPAPI_PROXY_PLUGIN_GLOBALS_H_
+#include <string>
+
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
@@ -15,6 +17,10 @@
#include "ppapi/shared_impl/callback_tracker.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+namespace IPC {
+class Sender;
+}
+
namespace ppapi {
namespace proxy {
@@ -58,6 +64,15 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals {
const std::string& value) OVERRIDE;
virtual MessageLoopShared* GetCurrentMessageLoop() OVERRIDE;
+ // Returns the channel for sending to the browser.
+ IPC::Sender* GetBrowserSender();
+
+ // Returns the language code of the current UI language.
+ std::string GetUILanguage();
+
+ // Sets the active url which is reported by breakpad.
+ void SetActiveURL(const std::string& url);
+
// Getters for the plugin-specific versions.
PluginResourceTracker* plugin_resource_tracker() {
return &plugin_resource_tracker_;
@@ -67,9 +82,6 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals {
}
// The embedder should call set_proxy_delegate during startup.
- PluginProxyDelegate* plugin_proxy_delegate() {
- return plugin_proxy_delegate_;
- }
void set_plugin_proxy_delegate(PluginProxyDelegate* d) {
plugin_proxy_delegate_ = d;
}
@@ -105,6 +117,8 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals {
void set_enable_threading(bool enable) { enable_threading_ = enable; }
private:
+ class BrowserSender;
+
// PpapiGlobals overrides.
virtual bool IsPluginGlobals() const OVERRIDE;
@@ -131,6 +145,8 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals {
// called.
std::string command_line_;
+ scoped_ptr<BrowserSender> browser_sender_;
+
DISALLOW_COPY_AND_ASSIGN(PluginGlobals);
};