| Index: content/renderer/pepper/host_globals.cc
|
| diff --git a/content/renderer/pepper/host_globals.cc b/content/renderer/pepper/host_globals.cc
|
| index 437addd8dfd92a7dd16405abe92b1afba3e9e85d..d3698f33036476260d48fa6779ccad38f0d6293e 100644
|
| --- a/content/renderer/pepper/host_globals.cc
|
| +++ b/content/renderer/pepper/host_globals.cc
|
| @@ -39,12 +39,11 @@ namespace {
|
| typedef std::set<blink::WebPluginContainer*> ContainerSet;
|
|
|
| // Adds all WebPluginContainers associated with the given module to the set.
|
| -void GetAllContainersForModule(PluginModule* module,
|
| - ContainerSet* containers) {
|
| - const PluginModule::PluginInstanceSet& instances =
|
| - module->GetAllInstances();
|
| +void GetAllContainersForModule(PluginModule* module, ContainerSet* containers) {
|
| + const PluginModule::PluginInstanceSet& instances = module->GetAllInstances();
|
| for (PluginModule::PluginInstanceSet::const_iterator i = instances.begin();
|
| - i != instances.end(); ++i)
|
| + i != instances.end();
|
| + ++i)
|
| containers->insert((*i)->container());
|
| }
|
|
|
| @@ -96,9 +95,7 @@ ppapi::ResourceTracker* HostGlobals::GetResourceTracker() {
|
| return &resource_tracker_;
|
| }
|
|
|
| -ppapi::VarTracker* HostGlobals::GetVarTracker() {
|
| - return &host_var_tracker_;
|
| -}
|
| +ppapi::VarTracker* HostGlobals::GetVarTracker() { return &host_var_tracker_; }
|
|
|
| ppapi::CallbackTracker* HostGlobals::GetCallbackTrackerForInstance(
|
| PP_Instance instance) {
|
| @@ -145,8 +142,11 @@ void HostGlobals::LogWithSource(PP_Instance instance,
|
| PepperPluginInstanceImpl* instance_object =
|
| HostGlobals::Get()->GetInstance(instance);
|
| if (instance_object) {
|
| - instance_object->container()->element().document().frame()->
|
| - addMessageToConsole(MakeLogMessage(level, source, value));
|
| + instance_object->container()
|
| + ->element()
|
| + .document()
|
| + .frame()
|
| + ->addMessageToConsole(MakeLogMessage(level, source, value));
|
| } else {
|
| BroadcastLogWithSource(0, level, source, value);
|
| }
|
| @@ -166,30 +166,30 @@ void HostGlobals::BroadcastLogWithSource(PP_Module pp_module,
|
| } else {
|
| // Unknown module, get containers for all modules.
|
| for (ModuleMap::const_iterator i = module_map_.begin();
|
| - i != module_map_.end(); ++i) {
|
| + i != module_map_.end();
|
| + ++i) {
|
| GetAllContainersForModule(i->second, &containers);
|
| }
|
| }
|
|
|
| WebConsoleMessage message = MakeLogMessage(level, source, value);
|
| - for (ContainerSet::iterator i = containers.begin();
|
| - i != containers.end(); ++i)
|
| - (*i)->element().document().frame()->addMessageToConsole(message);
|
| + for (ContainerSet::iterator i = containers.begin(); i != containers.end();
|
| + ++i)
|
| + (*i)->element().document().frame()->addMessageToConsole(message);
|
| }
|
|
|
| base::TaskRunner* HostGlobals::GetFileTaskRunner() {
|
| return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy().get();
|
| }
|
|
|
| -ppapi::MessageLoopShared* HostGlobals::GetCurrentMessageLoop() {
|
| - return NULL;
|
| -}
|
| +ppapi::MessageLoopShared* HostGlobals::GetCurrentMessageLoop() { return NULL; }
|
|
|
| PP_Module HostGlobals::AddModule(PluginModule* module) {
|
| #ifndef NDEBUG
|
| // Make sure we're not adding one more than once.
|
| for (ModuleMap::const_iterator i = module_map_.begin();
|
| - i != module_map_.end(); ++i)
|
| + i != module_map_.end();
|
| + ++i)
|
| DCHECK(i->second != module);
|
| #endif
|
|
|
| @@ -198,8 +198,7 @@ PP_Module HostGlobals::AddModule(PluginModule* module) {
|
| do {
|
| new_module = MakeTypedId(static_cast<PP_Module>(base::RandUint64()),
|
| ppapi::PP_ID_TYPE_MODULE);
|
| - } while (!new_module ||
|
| - module_map_.find(new_module) != module_map_.end());
|
| + } while (!new_module || module_map_.find(new_module) != module_map_.end());
|
| module_map_[new_module] = module;
|
| return new_module;
|
| }
|
| @@ -265,8 +264,6 @@ PepperPluginInstanceImpl* HostGlobals::GetInstance(PP_Instance instance) {
|
| return found->second;
|
| }
|
|
|
| -bool HostGlobals::IsHostGlobals() const {
|
| - return true;
|
| -}
|
| +bool HostGlobals::IsHostGlobals() const { return true; }
|
|
|
| } // namespace content
|
|
|