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

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

Issue 98543004: Remove usage of deprecated V8 APIs from c/r/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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 #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/dom_action_types.h" 8 #include "chrome/common/extensions/dom_action_types.h"
9 #include "chrome/common/extensions/extension_messages.h" 9 #include "chrome/common/extensions/extension_messages.h"
10 #include "chrome/renderer/chrome_render_process_observer.h" 10 #include "chrome/renderer/chrome_render_process_observer.h"
(...skipping 21 matching lines...) Expand all
32 const WebString& call_type, 32 const WebString& call_type,
33 const WebURL& url, 33 const WebURL& url,
34 const WebString& title) { 34 const WebString& title) {
35 scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); 35 scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
36 ActivityLogConverterStrategy strategy; 36 ActivityLogConverterStrategy strategy;
37 converter->SetFunctionAllowed(true); 37 converter->SetFunctionAllowed(true);
38 converter->SetStrategy(&strategy); 38 converter->SetStrategy(&strategy);
39 scoped_ptr<ListValue> argv_list_value(new ListValue()); 39 scoped_ptr<ListValue> argv_list_value(new ListValue());
40 for (int i =0; i < argc; i++) { 40 for (int i =0; i < argc; i++) {
41 argv_list_value->Set( 41 argv_list_value->Set(
42 i, converter->FromV8Value(argv[i], v8::Context::GetCurrent())); 42 i,
43 converter->FromV8Value(argv[i],
44 v8::Isolate::GetCurrent()->GetCurrentContext()));
43 } 45 }
44 ExtensionHostMsg_DOMAction_Params params; 46 ExtensionHostMsg_DOMAction_Params params;
45 params.url = url; 47 params.url = url;
46 params.url_title = title; 48 params.url_title = title;
47 params.api_call = api_name.utf8(); 49 params.api_call = api_name.utf8();
48 params.arguments.Swap(argv_list_value.get()); 50 params.arguments.Swap(argv_list_value.get());
49 const std::string type = call_type.utf8(); 51 const std::string type = call_type.utf8();
50 if (type == "Getter") 52 if (type == "Getter")
51 params.call_type = DomActionType::GETTER; 53 params.call_type = DomActionType::GETTER;
52 else if (type == "Setter") 54 else if (type == "Setter")
(...skipping 12 matching lines...) Expand all
65 // and register it with world_id. 67 // and register it with world_id.
66 if (!blink::hasDOMActivityLogger(world_id)) { 68 if (!blink::hasDOMActivityLogger(world_id)) {
67 DOMActivityLogger* logger = new DOMActivityLogger(extension_id); 69 DOMActivityLogger* logger = new DOMActivityLogger(extension_id);
68 blink::setDOMActivityLogger(world_id, logger); 70 blink::setDOMActivityLogger(world_id, logger);
69 } 71 }
70 #endif 72 #endif
71 } 73 }
72 74
73 } // namespace extensions 75 } // namespace extensions
74 76
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/document_custom_bindings.cc ('k') | chrome/renderer/extensions/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698