| 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/dispatcher.h" | 5 #include "extensions/renderer/dispatcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 resources.push_back(std::make_pair("sendRequest", IDR_SEND_REQUEST_JS)); | 493 resources.push_back(std::make_pair("sendRequest", IDR_SEND_REQUEST_JS)); |
| 494 resources.push_back(std::make_pair("setIcon", IDR_SET_ICON_JS)); | 494 resources.push_back(std::make_pair("setIcon", IDR_SET_ICON_JS)); |
| 495 resources.push_back(std::make_pair("test", IDR_TEST_CUSTOM_BINDINGS_JS)); | 495 resources.push_back(std::make_pair("test", IDR_TEST_CUSTOM_BINDINGS_JS)); |
| 496 resources.push_back( | 496 resources.push_back( |
| 497 std::make_pair("test_environment_specific_bindings", | 497 std::make_pair("test_environment_specific_bindings", |
| 498 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS)); | 498 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS)); |
| 499 resources.push_back(std::make_pair("uncaught_exception_handler", | 499 resources.push_back(std::make_pair("uncaught_exception_handler", |
| 500 IDR_UNCAUGHT_EXCEPTION_HANDLER_JS)); | 500 IDR_UNCAUGHT_EXCEPTION_HANDLER_JS)); |
| 501 resources.push_back(std::make_pair("unload_event", IDR_UNLOAD_EVENT_JS)); | 501 resources.push_back(std::make_pair("unload_event", IDR_UNLOAD_EVENT_JS)); |
| 502 resources.push_back(std::make_pair("utils", IDR_UTILS_JS)); | 502 resources.push_back(std::make_pair("utils", IDR_UTILS_JS)); |
| 503 // Note: webView not webview so that this doesn't interfere with the |
| 504 // chrome.webview API bindings. |
| 505 resources.push_back(std::make_pair("webView", IDR_WEB_VIEW_JS)); |
| 506 resources.push_back(std::make_pair("webViewEvents", IDR_WEB_VIEW_EVENTS_JS)); |
| 507 resources.push_back( |
| 508 std::make_pair("webViewExperimental", IDR_WEB_VIEW_EXPERIMENTAL_JS)); |
| 503 resources.push_back(std::make_pair("webViewInternal", | 509 resources.push_back(std::make_pair("webViewInternal", |
| 504 IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS)); | 510 IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS)); |
| 511 resources.push_back(std::make_pair("denyWebView", IDR_WEB_VIEW_DENY_JS)); |
| 505 resources.push_back( | 512 resources.push_back( |
| 506 std::make_pair(mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS)); | 513 std::make_pair(mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS)); |
| 507 resources.push_back( | 514 resources.push_back( |
| 508 std::make_pair(mojo::kCodecModuleName, IDR_MOJO_CODEC_JS)); | 515 std::make_pair(mojo::kCodecModuleName, IDR_MOJO_CODEC_JS)); |
| 509 resources.push_back( | 516 resources.push_back( |
| 510 std::make_pair(mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS)); | 517 std::make_pair(mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS)); |
| 511 resources.push_back( | 518 resources.push_back( |
| 512 std::make_pair(mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS)); | 519 std::make_pair(mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS)); |
| 513 resources.push_back( | 520 resources.push_back( |
| 514 std::make_pair(mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS)); | 521 std::make_pair(mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS)); |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 return v8::Handle<v8::Object>(); | 1333 return v8::Handle<v8::Object>(); |
| 1327 | 1334 |
| 1328 if (bind_name) | 1335 if (bind_name) |
| 1329 *bind_name = split.back(); | 1336 *bind_name = split.back(); |
| 1330 | 1337 |
| 1331 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) | 1338 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) |
| 1332 : bind_object; | 1339 : bind_object; |
| 1333 } | 1340 } |
| 1334 | 1341 |
| 1335 } // namespace extensions | 1342 } // namespace extensions |
| OLD | NEW |