Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: chrome/renderer/extensions/dom_activity_logger.h

Issue 12517011: Added activity logging for ext APIs with custom bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified it to work with another CL that happened while I was working on it Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/string_piece.h" 10 #include "base/string_piece.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 12 #include "third_party/WebKit/Source/Platform/chromium/public/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 WebKit::WebString; 16 using WebKit::WebString;
17 17
18 // Used to log DOM API calls from within WebKit. The events are sent via IPC to
19 // extensions::ActivityLog for recording and display.
18 namespace extensions { 20 namespace extensions {
19 21
20 class DOMActivityLogger: public WebKit::WebDOMActivityLogger { 22 class DOMActivityLogger: public WebKit::WebDOMActivityLogger {
21 public: 23 public:
22 static const int kMainWorldId = 0; 24 static const int kMainWorldId = 0;
23 DOMActivityLogger(const std::string& extension_id, 25 DOMActivityLogger(const std::string& extension_id,
24 const GURL& url, 26 const GURL& url,
25 const string16& title); 27 const string16& title);
26 28
27 // Marshalls the arguments into an ExtensionHostMsg_DOMAction_Params 29 // Marshalls the arguments into an ExtensionHostMsg_DOMAction_Params
(...skipping 19 matching lines...) Expand all
47 GURL url_; 49 GURL url_;
48 string16 title_; 50 string16 title_;
49 51
50 DISALLOW_COPY_AND_ASSIGN(DOMActivityLogger); 52 DISALLOW_COPY_AND_ASSIGN(DOMActivityLogger);
51 }; 53 };
52 54
53 } // namespace extensions 55 } // namespace extensions
54 56
55 #endif // CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_ 57 #endif // CHROME_RENDERER_EXTENSIONS_DOM_ACTIVITY_LOGGER_H_
56 58
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698