| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/renderer/extensions/dom_activity_logger.h" | 5 #include "chrome/renderer/extensions/dom_activity_logger.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/common/extensions/extension_messages.h" | 8 #include "chrome/common/extensions/extension_messages.h" |
| 9 #include "chrome/renderer/chrome_render_process_observer.h" | 9 #include "chrome/renderer/chrome_render_process_observer.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| 11 #include "content/public/renderer/v8_value_converter.h" | 11 #include "content/public/renderer/v8_value_converter.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 12 #include "third_party/WebKit/public/platform/WebString.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMActivityLogger.
h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMActivityLogger.
h" |
| 14 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
| 15 | 15 |
| 16 using content::V8ValueConverter; | 16 using content::V8ValueConverter; |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 DOMActivityLogger::DOMActivityLogger(const std::string& extension_id, | 20 DOMActivityLogger::DOMActivityLogger(const std::string& extension_id, |
| 21 const GURL& url, | 21 const GURL& url, |
| 22 const string16& title) | 22 const string16& title) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // If there is no logger registered for world_id, construct a new logger | 55 // If there is no logger registered for world_id, construct a new logger |
| 56 // and register it with world_id. | 56 // and register it with world_id. |
| 57 if (!WebKit::hasDOMActivityLogger(world_id)) { | 57 if (!WebKit::hasDOMActivityLogger(world_id)) { |
| 58 DOMActivityLogger* logger = new DOMActivityLogger(extension_id, url, title); | 58 DOMActivityLogger* logger = new DOMActivityLogger(extension_id, url, title); |
| 59 WebKit::setDOMActivityLogger(world_id, logger); | 59 WebKit::setDOMActivityLogger(world_id, logger); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace extensions | 63 } // namespace extensions |
| 64 | 64 |
| OLD | NEW |