Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: ppapi/nacl_irt/ppapi_dispatcher.cc

Issue 2762513002: Remove keep-alive impulse IPCs from NaCl modules. (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/shell/browser/shell_nacl_browser_delegate.cc ('k') | ppapi/proxy/plugin_globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/nacl_irt/ppapi_dispatcher.h" 5 #include "ppapi/nacl_irt/ppapi_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::CommandLine::Init(0, NULL); 158 base::CommandLine::Init(0, NULL);
159 for (size_t i = 0; i < args.switch_names.size(); ++i) { 159 for (size_t i = 0; i < args.switch_names.size(); ++i) {
160 DCHECK(i < args.switch_values.size()); 160 DCHECK(i < args.switch_values.size());
161 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 161 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
162 args.switch_names[i], args.switch_values[i]); 162 args.switch_names[i], args.switch_values[i]);
163 } 163 }
164 logging::LoggingSettings settings; 164 logging::LoggingSettings settings;
165 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 165 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
166 logging::InitLogging(settings); 166 logging::InitLogging(settings);
167 167
168 proxy::PluginGlobals::Get()->set_keepalive_throttle_interval_milliseconds(
169 args.keepalive_throttle_interval_milliseconds);
170
171 // Tell the process-global GetInterface which interfaces it can return to the 168 // Tell the process-global GetInterface which interfaces it can return to the
172 // plugin. 169 // plugin.
173 proxy::InterfaceList::SetProcessGlobalPermissions(args.permissions); 170 proxy::InterfaceList::SetProcessGlobalPermissions(args.permissions);
174 171
175 int32_t error = ::PPP_InitializeModule( 172 int32_t error = ::PPP_InitializeModule(
176 0 /* module */, 173 0 /* module */,
177 &proxy::PluginDispatcher::GetBrowserInterface); 174 &proxy::PluginDispatcher::GetBrowserInterface);
178 if (error) 175 if (error)
179 ::exit(error); 176 ::exit(error);
180 177
(...skipping 23 matching lines...) Expand all
204 NOTREACHED(); 201 NOTREACHED();
205 return; 202 return;
206 } 203 }
207 std::map<uint32_t, proxy::PluginDispatcher*>::iterator dispatcher = 204 std::map<uint32_t, proxy::PluginDispatcher*>::iterator dispatcher =
208 plugin_dispatchers_.find(id); 205 plugin_dispatchers_.find(id);
209 if (dispatcher != plugin_dispatchers_.end()) 206 if (dispatcher != plugin_dispatchers_.end())
210 dispatcher->second->OnMessageReceived(msg); 207 dispatcher->second->OnMessageReceived(msg);
211 } 208 }
212 209
213 } // namespace ppapi 210 } // namespace ppapi
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_nacl_browser_delegate.cc ('k') | ppapi/proxy/plugin_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698