| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 WebConsoleMessage MakeLogMessage(PP_LogLevel level, | 65 WebConsoleMessage MakeLogMessage(PP_LogLevel level, |
| 66 const std::string& source, | 66 const std::string& source, |
| 67 const std::string& message) { | 67 const std::string& message) { |
| 68 std::string result = source; | 68 std::string result = source; |
| 69 if (!result.empty()) | 69 if (!result.empty()) |
| 70 result.append(": "); | 70 result.append(": "); |
| 71 result.append(message); | 71 result.append(message); |
| 72 return WebConsoleMessage(LogLevelToWebLogLevel(level), | 72 return WebConsoleMessage(LogLevelToWebLogLevel(level), |
| 73 WebString(UTF8ToUTF16(result))); | 73 WebString(base::UTF8ToUTF16(result))); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace | 76 } // namespace |
| 77 | 77 |
| 78 HostGlobals* HostGlobals::host_globals_ = NULL; | 78 HostGlobals* HostGlobals::host_globals_ = NULL; |
| 79 | 79 |
| 80 HostGlobals::HostGlobals() | 80 HostGlobals::HostGlobals() |
| 81 : ppapi::PpapiGlobals(), | 81 : ppapi::PpapiGlobals(), |
| 82 resource_tracker_(ResourceTracker::SINGLE_THREADED) { | 82 resource_tracker_(ResourceTracker::SINGLE_THREADED) { |
| 83 DCHECK(!host_globals_); | 83 DCHECK(!host_globals_); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 if (found == instance_map_.end()) | 263 if (found == instance_map_.end()) |
| 264 return NULL; | 264 return NULL; |
| 265 return found->second; | 265 return found->second; |
| 266 } | 266 } |
| 267 | 267 |
| 268 bool HostGlobals::IsHostGlobals() const { | 268 bool HostGlobals::IsHostGlobals() const { |
| 269 return true; | 269 return true; |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace content | 272 } // namespace content |
| OLD | NEW |