| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "content/renderer/pepper/host_globals.h" | 5 #include "content/renderer/pepper/host_globals.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 WebConsoleMessage message = MakeLogMessage(level, source, value); | 185 WebConsoleMessage message = MakeLogMessage(level, source, value); |
| 186 for (ContainerSet::iterator i = containers.begin(); i != containers.end(); | 186 for (ContainerSet::iterator i = containers.begin(); i != containers.end(); |
| 187 ++i) { | 187 ++i) { |
| 188 WebLocalFrame* frame = (*i)->document().frame(); | 188 WebLocalFrame* frame = (*i)->document().frame(); |
| 189 if (frame) | 189 if (frame) |
| 190 frame->addMessageToConsole(message); | 190 frame->addMessageToConsole(message); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 base::TaskRunner* HostGlobals::GetFileTaskRunner() { | 194 base::TaskRunner* HostGlobals::GetFileTaskRunner() { |
| 195 return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy().get(); | 195 return RenderThreadImpl::current()->GetFileThreadTaskRunner().get(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 ppapi::MessageLoopShared* HostGlobals::GetCurrentMessageLoop() { return NULL; } | 198 ppapi::MessageLoopShared* HostGlobals::GetCurrentMessageLoop() { return NULL; } |
| 199 | 199 |
| 200 PP_Module HostGlobals::AddModule(PluginModule* module) { | 200 PP_Module HostGlobals::AddModule(PluginModule* module) { |
| 201 #ifndef NDEBUG | 201 #ifndef NDEBUG |
| 202 // Make sure we're not adding one more than once. | 202 // Make sure we're not adding one more than once. |
| 203 for (ModuleMap::const_iterator i = module_map_.begin(); | 203 for (ModuleMap::const_iterator i = module_map_.begin(); |
| 204 i != module_map_.end(); | 204 i != module_map_.end(); |
| 205 ++i) | 205 ++i) |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 << instance << " is not a PP_Instance."; | 273 << instance << " is not a PP_Instance."; |
| 274 InstanceMap::iterator found = instance_map_.find(instance); | 274 InstanceMap::iterator found = instance_map_.find(instance); |
| 275 if (found == instance_map_.end()) | 275 if (found == instance_map_.end()) |
| 276 return NULL; | 276 return NULL; |
| 277 return found->second; | 277 return found->second; |
| 278 } | 278 } |
| 279 | 279 |
| 280 bool HostGlobals::IsHostGlobals() const { return true; } | 280 bool HostGlobals::IsHostGlobals() const { return true; } |
| 281 | 281 |
| 282 } // namespace content | 282 } // namespace content |
| OLD | NEW |