Chromium Code Reviews| Index: Source/bindings/v8/V8DOMActivityLogger.h |
| diff --git a/Source/bindings/v8/V8DOMActivityLogger.h b/Source/bindings/v8/V8DOMActivityLogger.h |
| index 55f28d10d2bd7de22bc3e1c4cdbc7df4fe232165..8acc1733202b0130a5e4654a254299f317c0c97c 100644 |
| --- a/Source/bindings/v8/V8DOMActivityLogger.h |
| +++ b/Source/bindings/v8/V8DOMActivityLogger.h |
| @@ -37,6 +37,8 @@ |
| namespace WebCore { |
| +class KURL; |
| + |
| class V8DOMActivityLogger { |
| public: |
| virtual ~V8DOMActivityLogger() { } |
| @@ -47,9 +49,20 @@ public: |
| virtual void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) { } |
| // Associates a logger with the world identified by worldId (worlId may be 0 |
| - // identifying the main world). |
| - static void setActivityLogger(int worldId, PassOwnPtr<V8DOMActivityLogger>); |
| - static V8DOMActivityLogger* activityLogger(int worldId); |
| + // identifying the main world) and extension ID. Extension ID is used to |
| + // identify a logger for main world only (worldId == 0). If the world is not |
| + // a main world, an extension ID is ignored. |
| + // |
| + // A render process may host multiple extensions when the browser hits a |
|
haraken
2014/05/08 23:47:45
render => renderer
pmarch
2014/05/09 14:53:52
Done.
|
| + // renderer process limit. Thus, within a single render there may be |
|
haraken
2014/05/08 23:47:45
render => renderer
pmarch
2014/05/09 14:53:52
Done.
|
| + // multiple main worlds (worldId == 0) that corresponds to different |
| + // extensions. In order to find an appropriate logger for an extension's |
| + // main world in such cases, we require an extension ID. Otherwise, |
|
haraken
2014/05/08 23:47:45
This comment is misleading (e.g., "there may be mu
pmarch
2014/05/09 14:53:52
Done.
|
| + // extension activities may be logged under a wrong extension ID. |
| + static void setActivityLogger(int worldId, const String&, PassOwnPtr<V8DOMActivityLogger>); |
| + static V8DOMActivityLogger* activityLogger(int worldId, const String&); |
|
haraken
2014/05/08 23:47:45
Can we make this a private method?
pmarch
2014/05/09 14:53:52
No, as it is called from WebDOMActivityLogger.cpp
|
| + static V8DOMActivityLogger* activityLogger(int worldId, const KURL&); |
| + |
| }; |
| } // namespace WebCore |