| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // NULL, but the instance may actually outlive its container. Callers of | 50 // NULL, but the instance may actually outlive its container. Callers of |
| 51 // GetAllContainersForModule only want to know about valid containers. | 51 // GetAllContainersForModule only want to know about valid containers. |
| 52 if (container) | 52 if (container) |
| 53 containers->insert(container); | 53 containers->insert(container); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 WebConsoleMessage::Level LogLevelToWebLogLevel(PP_LogLevel level) { | 57 WebConsoleMessage::Level LogLevelToWebLogLevel(PP_LogLevel level) { |
| 58 switch (level) { | 58 switch (level) { |
| 59 case PP_LOGLEVEL_TIP: | 59 case PP_LOGLEVEL_TIP: |
| 60 return WebConsoleMessage::LevelDebug; | 60 return WebConsoleMessage::LevelVerbose; |
| 61 case PP_LOGLEVEL_LOG: | 61 case PP_LOGLEVEL_LOG: |
| 62 return WebConsoleMessage::LevelLog; | 62 return WebConsoleMessage::LevelInfo; |
| 63 case PP_LOGLEVEL_WARNING: | 63 case PP_LOGLEVEL_WARNING: |
| 64 return WebConsoleMessage::LevelWarning; | 64 return WebConsoleMessage::LevelWarning; |
| 65 case PP_LOGLEVEL_ERROR: | 65 case PP_LOGLEVEL_ERROR: |
| 66 default: | 66 default: |
| 67 return WebConsoleMessage::LevelError; | 67 return WebConsoleMessage::LevelError; |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 WebConsoleMessage MakeLogMessage(PP_LogLevel level, | 71 WebConsoleMessage MakeLogMessage(PP_LogLevel level, |
| 72 const std::string& source, | 72 const std::string& source, |
| (...skipping 200 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 |