| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 url = document->url(); | 57 url = document->url(); |
| 58 title = document->title(); | 58 title = document->title(); |
| 59 } | 59 } |
| 60 m_domActivityLogger->log(WebString(apiName), argc, argv, WebString(extra
Info), WebURL(url), WebString(title)); | 60 m_domActivityLogger->log(WebString(apiName), argc, argv, WebString(extra
Info), WebURL(url), WebString(title)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 OwnPtr<WebDOMActivityLogger> m_domActivityLogger; | 64 OwnPtr<WebDOMActivityLogger> m_domActivityLogger; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 bool hasDOMActivityLogger(int worldId, const WebString& extensionId) |
| 68 { |
| 69 return V8DOMActivityLogger::activityLogger(worldId, extensionId); |
| 70 } |
| 71 |
| 72 void setDOMActivityLogger(int worldId, const WebString& extensionId, WebDOMActiv
ityLogger* logger) |
| 73 { |
| 74 ASSERT(logger); |
| 75 V8DOMActivityLogger::setActivityLogger(worldId, extensionId, adoptPtr(new DO
MActivityLoggerContainer(adoptPtr(logger)))); |
| 76 } |
| 77 |
| 78 // TODO(pmarch): remove the following two methods after modifying Chrome to |
| 79 // use the above ones. |
| 67 bool hasDOMActivityLogger(int worldId) | 80 bool hasDOMActivityLogger(int worldId) |
| 68 { | 81 { |
| 69 return V8DOMActivityLogger::activityLogger(worldId); | 82 return V8DOMActivityLogger::activityLogger(worldId, WebString()); |
| 70 } | 83 } |
| 71 | 84 |
| 72 void setDOMActivityLogger(int worldId, WebDOMActivityLogger* logger) | 85 void setDOMActivityLogger(int worldId, WebDOMActivityLogger* logger) |
| 73 { | 86 { |
| 74 ASSERT(logger); | 87 ASSERT(logger); |
| 75 V8DOMActivityLogger::setActivityLogger(worldId, adoptPtr(new DOMActivityLogg
erContainer(adoptPtr(logger)))); | 88 V8DOMActivityLogger::setActivityLogger(worldId, WebString(), adoptPtr(new DO
MActivityLoggerContainer(adoptPtr(logger)))); |
| 76 } | 89 } |
| 77 | 90 |
| 78 } // namespace blink | 91 } // namespace blink |
| OLD | NEW |