| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/send_request_natives.h" | 5 #include "extensions/renderer/send_request_natives.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 8 #include "content/public/child/v8_value_converter.h" | 10 #include "content/public/child/v8_value_converter.h" |
| 9 #include "extensions/renderer/request_sender.h" | 11 #include "extensions/renderer/request_sender.h" |
| 10 #include "extensions/renderer/script_context.h" | 12 #include "extensions/renderer/script_context.h" |
| 11 | 13 |
| 12 using content::V8ValueConverter; | 14 using content::V8ValueConverter; |
| 13 | 15 |
| 14 namespace extensions { | 16 namespace extensions { |
| 15 | 17 |
| 16 SendRequestNatives::SendRequestNatives(RequestSender* request_sender, | 18 SendRequestNatives::SendRequestNatives(RequestSender* request_sender, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 66 |
| 65 void SendRequestNatives::GetGlobal( | 67 void SendRequestNatives::GetGlobal( |
| 66 const v8::FunctionCallbackInfo<v8::Value>& args) { | 68 const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 67 CHECK_EQ(1, args.Length()); | 69 CHECK_EQ(1, args.Length()); |
| 68 CHECK(args[0]->IsObject()); | 70 CHECK(args[0]->IsObject()); |
| 69 args.GetReturnValue().Set( | 71 args.GetReturnValue().Set( |
| 70 v8::Local<v8::Object>::Cast(args[0])->CreationContext()->Global()); | 72 v8::Local<v8::Object>::Cast(args[0])->CreationContext()->Global()); |
| 71 } | 73 } |
| 72 | 74 |
| 73 } // namespace extensions | 75 } // namespace extensions |
| OLD | NEW |