| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 PP_Module HostGlobals::GetModuleForInstance(PP_Instance instance) { | 130 PP_Module HostGlobals::GetModuleForInstance(PP_Instance instance) { |
| 131 PepperPluginInstanceImpl* inst = GetInstance(instance); | 131 PepperPluginInstanceImpl* inst = GetInstance(instance); |
| 132 if (!inst) | 132 if (!inst) |
| 133 return 0; | 133 return 0; |
| 134 return inst->module()->pp_module(); | 134 return inst->module()->pp_module(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 std::string HostGlobals::GetCmdLine() { | 137 std::string HostGlobals::GetCmdLine() { |
| 138 return CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 138 return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 139 switches::kPpapiFlashArgs); | 139 switches::kPpapiFlashArgs); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void HostGlobals::PreCacheFontForFlash(const void* logfontw) { | 142 void HostGlobals::PreCacheFontForFlash(const void* logfontw) { |
| 143 // Not implemented in-process. | 143 // Not implemented in-process. |
| 144 } | 144 } |
| 145 | 145 |
| 146 void HostGlobals::LogWithSource(PP_Instance instance, | 146 void HostGlobals::LogWithSource(PP_Instance instance, |
| 147 PP_LogLevel level, | 147 PP_LogLevel level, |
| 148 const std::string& source, | 148 const std::string& source, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 << instance << " is not a PP_Instance."; | 271 << instance << " is not a PP_Instance."; |
| 272 InstanceMap::iterator found = instance_map_.find(instance); | 272 InstanceMap::iterator found = instance_map_.find(instance); |
| 273 if (found == instance_map_.end()) | 273 if (found == instance_map_.end()) |
| 274 return NULL; | 274 return NULL; |
| 275 return found->second; | 275 return found->second; |
| 276 } | 276 } |
| 277 | 277 |
| 278 bool HostGlobals::IsHostGlobals() const { return true; } | 278 bool HostGlobals::IsHostGlobals() const { return true; } |
| 279 | 279 |
| 280 } // namespace content | 280 } // namespace content |
| OLD | NEW |