| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_v8_context.h" | 5 #include "chrome/renderer/extensions/chrome_v8_context.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/common/extensions/features/base_feature_provider.h" | |
| 12 #include "chrome/renderer/extensions/chrome_v8_extension.h" | 11 #include "chrome/renderer/extensions/chrome_v8_extension.h" |
| 13 #include "chrome/renderer/extensions/module_system.h" | 12 #include "chrome/renderer/extensions/module_system.h" |
| 14 #include "chrome/renderer/extensions/user_script_slave.h" | 13 #include "chrome/renderer/extensions/user_script_slave.h" |
| 15 #include "content/public/renderer/render_view.h" | 14 #include "content/public/renderer/render_view.h" |
| 16 #include "content/public/renderer/v8_value_converter.h" | 15 #include "content/public/renderer/v8_value_converter.h" |
| 17 #include "extensions/common/extension.h" | 16 #include "extensions/common/extension.h" |
| 18 #include "extensions/common/extension_api.h" | 17 #include "extensions/common/extension_api.h" |
| 19 #include "extensions/common/extension_urls.h" | 18 #include "extensions/common/extension_urls.h" |
| 19 #include "extensions/common/features/base_feature_provider.h" |
| 20 #include "third_party/WebKit/public/web/WebFrame.h" | 20 #include "third_party/WebKit/public/web/WebFrame.h" |
| 21 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" | 21 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" |
| 22 #include "third_party/WebKit/public/web/WebView.h" | 22 #include "third_party/WebKit/public/web/WebView.h" |
| 23 #include "v8/include/v8.h" | 23 #include "v8/include/v8.h" |
| 24 | 24 |
| 25 using content::V8ValueConverter; | 25 using content::V8ValueConverter; |
| 26 | 26 |
| 27 namespace extensions { | 27 namespace extensions { |
| 28 | 28 |
| 29 ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context, | 29 ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 v8::Handle<v8::Value> retval = module_system_->CallModuleMethod( | 171 v8::Handle<v8::Value> retval = module_system_->CallModuleMethod( |
| 172 "sendRequest", "handleResponse", arraysize(argv), argv); | 172 "sendRequest", "handleResponse", arraysize(argv), argv); |
| 173 | 173 |
| 174 // In debug, the js will validate the callback parameters and return a | 174 // In debug, the js will validate the callback parameters and return a |
| 175 // string if a validation error has occured. | 175 // string if a validation error has occured. |
| 176 DCHECK(retval.IsEmpty() || retval->IsUndefined()) | 176 DCHECK(retval.IsEmpty() || retval->IsUndefined()) |
| 177 << *v8::String::Utf8Value(retval); | 177 << *v8::String::Utf8Value(retval); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace extensions | 180 } // namespace extensions |
| OLD | NEW |