summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 22:35:53 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 22:35:53 +0000
commitbc2eeb4a236eab44d172d4737d16c9c237db4210 (patch)
tree23a8649559051ce1486c143aaf88302692a365d3 /content/ppapi_plugin
parentb2e8e0bde68e71b365d556c029299c80439cbef7 (diff)
downloadchromium_src-bc2eeb4a236eab44d172d4737d16c9c237db4210.zip
chromium_src-bc2eeb4a236eab44d172d4737d16c9c237db4210.tar.gz
chromium_src-bc2eeb4a236eab44d172d4737d16c9c237db4210.tar.bz2
Add a way to query whether a given instance is off-the-record
BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10278007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/plugin_process_dispatcher.cc7
-rw-r--r--content/ppapi_plugin/plugin_process_dispatcher.h3
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc9
-rw-r--r--content/ppapi_plugin/ppapi_thread.h4
4 files changed, 16 insertions, 7 deletions
diff --git a/content/ppapi_plugin/plugin_process_dispatcher.cc b/content/ppapi_plugin/plugin_process_dispatcher.cc
index 22c42c7..bf77c66 100644
--- a/content/ppapi_plugin/plugin_process_dispatcher.cc
+++ b/content/ppapi_plugin/plugin_process_dispatcher.cc
@@ -17,8 +17,11 @@ const int kPluginReleaseTimeSeconds = 30;
PluginProcessDispatcher::PluginProcessDispatcher(
base::ProcessHandle remote_process_handle,
- PP_GetInterface_Func get_interface)
- : ppapi::proxy::PluginDispatcher(remote_process_handle, get_interface) {
+ PP_GetInterface_Func get_interface,
+ bool incognito)
+ : ppapi::proxy::PluginDispatcher(remote_process_handle,
+ get_interface,
+ incognito) {
ChildProcess::current()->AddRefProcess();
}
diff --git a/content/ppapi_plugin/plugin_process_dispatcher.h b/content/ppapi_plugin/plugin_process_dispatcher.h
index 12455d8..631b0c1 100644
--- a/content/ppapi_plugin/plugin_process_dispatcher.h
+++ b/content/ppapi_plugin/plugin_process_dispatcher.h
@@ -14,7 +14,8 @@
class PluginProcessDispatcher : public ppapi::proxy::PluginDispatcher {
public:
PluginProcessDispatcher(base::ProcessHandle remote_process_handle,
- PP_GetInterface_Func get_interface);
+ PP_GetInterface_Func get_interface,
+ bool incognito);
virtual ~PluginProcessDispatcher();
private:
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 1a4fa68..bf84ce2 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -248,10 +248,11 @@ void PpapiThread::OnMsgLoadPlugin(const FilePath& path) {
}
void PpapiThread::OnMsgCreateChannel(base::ProcessHandle host_process_handle,
- int renderer_id) {
+ int renderer_id,
+ bool incognito) {
IPC::ChannelHandle channel_handle;
if (!library_.is_valid() || // Plugin couldn't be loaded.
- !SetupRendererChannel(host_process_handle, renderer_id,
+ !SetupRendererChannel(host_process_handle, renderer_id, incognito,
&channel_handle)) {
Send(new PpapiHostMsg_ChannelCreated(IPC::ChannelHandle()));
return;
@@ -285,6 +286,7 @@ void PpapiThread::OnPluginDispatcherMessageReceived(const IPC::Message& msg) {
bool PpapiThread::SetupRendererChannel(base::ProcessHandle host_process_handle,
int renderer_id,
+ bool incognito,
IPC::ChannelHandle* handle) {
DCHECK(is_broker_ == (connect_instance_func_ != NULL));
IPC::ChannelHandle plugin_handle;
@@ -304,7 +306,8 @@ bool PpapiThread::SetupRendererChannel(base::ProcessHandle host_process_handle,
dispatcher = broker_dispatcher;
} else {
PluginProcessDispatcher* plugin_dispatcher =
- new PluginProcessDispatcher(host_process_handle, get_plugin_interface_);
+ new PluginProcessDispatcher(host_process_handle, get_plugin_interface_,
+ incognito);
init_result = plugin_dispatcher->InitPluginWithChannel(this,
plugin_handle,
false);
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index fa071df..c416ba4 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -56,7 +56,8 @@ class PpapiThread : public ChildThread,
// Message handlers.
void OnMsgLoadPlugin(const FilePath& path);
void OnMsgCreateChannel(base::ProcessHandle host_process_handle,
- int renderer_id);
+ int renderer_id,
+ bool incognito);
void OnMsgSetNetworkState(bool online);
void OnPluginDispatcherMessageReceived(const IPC::Message& msg);
@@ -64,6 +65,7 @@ class PpapiThread : public ChildThread,
// fills the given ChannelHandle with the information from the new channel.
bool SetupRendererChannel(base::ProcessHandle host_process_handle,
int renderer_id,
+ bool incognito,
IPC::ChannelHandle* handle);
// Sets up the name of the plugin for logging using the given path.