| 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 #ifndef CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const GURL& url, | 26 const GURL& url, |
| 27 const string16& title); | 27 const string16& title); |
| 28 | 28 |
| 29 // Marshalls the arguments into an ExtensionHostMsg_DOMAction_Params | 29 // Marshalls the arguments into an ExtensionHostMsg_DOMAction_Params |
| 30 // and sends it over to the browser (via IPC) for appending it to the | 30 // and sends it over to the browser (via IPC) for appending it to the |
| 31 // extension activity log. | 31 // extension activity log. |
| 32 // (Overrides the log method in WebKit::WebDOMActivityLogger) | 32 // (Overrides the log method in WebKit::WebDOMActivityLogger) |
| 33 virtual void log(const WebString& api_name, | 33 virtual void log(const WebString& api_name, |
| 34 int argc, | 34 int argc, |
| 35 const v8::Handle<v8::Value> argv[], | 35 const v8::Handle<v8::Value> argv[], |
| 36 const WebString& extra_info); | 36 const WebString& call_type); |
| 37 | 37 |
| 38 // If extension activity logging is enabled then check (using the | 38 // If extension activity logging is enabled then check (using the |
| 39 // WebKit API) if there is no logger attached to the world corresponding | 39 // WebKit API) if there is no logger attached to the world corresponding |
| 40 // to world_id, and if so, construct a new logger and attach it. | 40 // to world_id, and if so, construct a new logger and attach it. |
| 41 // worl_id = 0 indicates the main world. | 41 // worl_id = 0 indicates the main world. |
| 42 static void AttachToWorld(int world_id, | 42 static void AttachToWorld(int world_id, |
| 43 const std::string& extension_id, | 43 const std::string& extension_id, |
| 44 const GURL& url, | 44 const GURL& url, |
| 45 const string16& title); | 45 const string16& title); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 std::string extension_id_; | 48 std::string extension_id_; |
| 49 GURL url_; | 49 GURL url_; |
| 50 string16 title_; | 50 string16 title_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(DOMActivityLogger); | 52 DISALLOW_COPY_AND_ASSIGN(DOMActivityLogger); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace extensions | 55 } // namespace extensions |
| 56 | 56 |
| 57 #endif // CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ | 57 #endif // CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ |
| 58 | 58 |
| OLD | NEW |