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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class DOMActivityLoggerContainer : public V8DOMActivityLogger { | 43 class DOMActivityLoggerContainer : public V8DOMActivityLogger { |
44 public: | 44 public: |
45 explicit DOMActivityLoggerContainer(PassOwnPtr<WebDOMActivityLogger> logger) | 45 explicit DOMActivityLoggerContainer(PassOwnPtr<WebDOMActivityLogger> logger) |
46 : m_domActivityLogger(logger) | 46 : m_domActivityLogger(logger) |
47 { | 47 { |
48 } | 48 } |
49 | 49 |
50 virtual void logGetter(const String& apiName) OVERRIDE | 50 virtual void logGetter(const String& apiName) override |
51 { | 51 { |
52 m_domActivityLogger->logGetter(WebString(apiName), getURL(), getTitle())
; | 52 m_domActivityLogger->logGetter(WebString(apiName), getURL(), getTitle())
; |
53 } | 53 } |
54 | 54 |
55 virtual void logSetter(const String& apiName, const v8::Handle<v8::Value>& n
ewValue) OVERRIDE | 55 virtual void logSetter(const String& apiName, const v8::Handle<v8::Value>& n
ewValue) override |
56 { | 56 { |
57 m_domActivityLogger->logSetter(WebString(apiName), newValue, getURL(), g
etTitle()); | 57 m_domActivityLogger->logSetter(WebString(apiName), newValue, getURL(), g
etTitle()); |
58 } | 58 } |
59 | 59 |
60 virtual void logMethod(const String& apiName, int argc, const v8::Handle<v8:
:Value>* argv) OVERRIDE | 60 virtual void logMethod(const String& apiName, int argc, const v8::Handle<v8:
:Value>* argv) override |
61 { | 61 { |
62 m_domActivityLogger->logMethod(WebString(apiName), argc, argv, getURL(),
getTitle()); | 62 m_domActivityLogger->logMethod(WebString(apiName), argc, argv, getURL(),
getTitle()); |
63 } | 63 } |
64 | 64 |
65 virtual void logEvent(const String& eventName, int argc, const String* argv)
OVERRIDE | 65 virtual void logEvent(const String& eventName, int argc, const String* argv)
override |
66 { | 66 { |
67 Vector<WebString> webStringArgv; | 67 Vector<WebString> webStringArgv; |
68 for (int i = 0; i < argc; i++) | 68 for (int i = 0; i < argc; i++) |
69 webStringArgv.append(argv[i]); | 69 webStringArgv.append(argv[i]); |
70 m_domActivityLogger->logEvent(WebString(eventName), argc, webStringArgv.
data(), getURL(), getTitle()); | 70 m_domActivityLogger->logEvent(WebString(eventName), argc, webStringArgv.
data(), getURL(), getTitle()); |
71 } | 71 } |
72 | 72 |
73 private: | 73 private: |
74 WebURL getURL() | 74 WebURL getURL() |
75 { | 75 { |
(...skipping 17 matching lines...) Expand all Loading... |
93 return V8DOMActivityLogger::activityLogger(worldId, extensionId); | 93 return V8DOMActivityLogger::activityLogger(worldId, extensionId); |
94 } | 94 } |
95 | 95 |
96 void setDOMActivityLogger(int worldId, const WebString& extensionId, WebDOMActiv
ityLogger* logger) | 96 void setDOMActivityLogger(int worldId, const WebString& extensionId, WebDOMActiv
ityLogger* logger) |
97 { | 97 { |
98 ASSERT(logger); | 98 ASSERT(logger); |
99 V8DOMActivityLogger::setActivityLogger(worldId, extensionId, adoptPtr(new DO
MActivityLoggerContainer(adoptPtr(logger)))); | 99 V8DOMActivityLogger::setActivityLogger(worldId, extensionId, adoptPtr(new DO
MActivityLoggerContainer(adoptPtr(logger)))); |
100 } | 100 } |
101 | 101 |
102 } // namespace blink | 102 } // namespace blink |
OLD | NEW |