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/module_system.h" | 5 #include "chrome/renderer/extensions/module_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "chrome/common/extensions/extension_messages.h" | 12 #include "chrome/common/extensions/extension_messages.h" |
13 #include "chrome/renderer/extensions/chrome_v8_context.h" | 13 #include "chrome/renderer/extensions/chrome_v8_context.h" |
14 #include "chrome/renderer/extensions/console.h" | 14 #include "chrome/renderer/extensions/console.h" |
15 #include "content/public/renderer/render_view.h" | 15 #include "content/public/renderer/render_view.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScopedMicrotaskSup
pression.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScopedMicrotaskSup
pression.h" |
18 | 18 |
19 namespace extensions { | 19 namespace extensions { |
20 | 20 |
21 namespace { | 21 namespace { |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 v8::Handle<v8::String> ModuleSystem::WrapSource(v8::Handle<v8::String> source) { | 470 v8::Handle<v8::String> ModuleSystem::WrapSource(v8::Handle<v8::String> source) { |
471 v8::HandleScope handle_scope; | 471 v8::HandleScope handle_scope; |
472 v8::Handle<v8::String> left = v8::String::New( | 472 v8::Handle<v8::String> left = v8::String::New( |
473 "(function(require, requireNative, exports) {'use strict';"); | 473 "(function(require, requireNative, exports) {'use strict';"); |
474 v8::Handle<v8::String> right = v8::String::New("\n})"); | 474 v8::Handle<v8::String> right = v8::String::New("\n})"); |
475 return handle_scope.Close( | 475 return handle_scope.Close( |
476 v8::String::Concat(left, v8::String::Concat(source, right))); | 476 v8::String::Concat(left, v8::String::Concat(source, right))); |
477 } | 477 } |
478 | 478 |
479 } // extensions | 479 } // extensions |
OLD | NEW |