| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 resources.push_back(std::make_pair("sendRequest", IDR_SEND_REQUEST_JS)); | 524 resources.push_back(std::make_pair("sendRequest", IDR_SEND_REQUEST_JS)); |
| 525 resources.push_back(std::make_pair("setIcon", IDR_SET_ICON_JS)); | 525 resources.push_back(std::make_pair("setIcon", IDR_SET_ICON_JS)); |
| 526 resources.push_back(std::make_pair("test", IDR_TEST_CUSTOM_BINDINGS_JS)); | 526 resources.push_back(std::make_pair("test", IDR_TEST_CUSTOM_BINDINGS_JS)); |
| 527 resources.push_back( | 527 resources.push_back( |
| 528 std::make_pair("test_environment_specific_bindings", | 528 std::make_pair("test_environment_specific_bindings", |
| 529 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS)); | 529 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS)); |
| 530 resources.push_back(std::make_pair("uncaught_exception_handler", | 530 resources.push_back(std::make_pair("uncaught_exception_handler", |
| 531 IDR_UNCAUGHT_EXCEPTION_HANDLER_JS)); | 531 IDR_UNCAUGHT_EXCEPTION_HANDLER_JS)); |
| 532 resources.push_back(std::make_pair("unload_event", IDR_UNLOAD_EVENT_JS)); | 532 resources.push_back(std::make_pair("unload_event", IDR_UNLOAD_EVENT_JS)); |
| 533 resources.push_back(std::make_pair("utils", IDR_UTILS_JS)); | 533 resources.push_back(std::make_pair("utils", IDR_UTILS_JS)); |
| 534 resources.push_back(std::make_pair("webRequest", |
| 535 IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS)); |
| 536 resources.push_back( |
| 537 std::make_pair("webRequestInternal", |
| 538 IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS)); |
| 534 // Note: webView not webview so that this doesn't interfere with the | 539 // Note: webView not webview so that this doesn't interfere with the |
| 535 // chrome.webview API bindings. | 540 // chrome.webview API bindings. |
| 536 resources.push_back(std::make_pair("webView", IDR_WEB_VIEW_JS)); | 541 resources.push_back(std::make_pair("webView", IDR_WEB_VIEW_JS)); |
| 537 resources.push_back(std::make_pair("webViewEvents", IDR_WEB_VIEW_EVENTS_JS)); | 542 resources.push_back(std::make_pair("webViewEvents", IDR_WEB_VIEW_EVENTS_JS)); |
| 538 resources.push_back( | 543 resources.push_back( |
| 539 std::make_pair("webViewExperimental", IDR_WEB_VIEW_EXPERIMENTAL_JS)); | 544 std::make_pair("webViewExperimental", IDR_WEB_VIEW_EXPERIMENTAL_JS)); |
| 540 resources.push_back(std::make_pair("webViewInternal", | 545 resources.push_back(std::make_pair("webViewInternal", |
| 541 IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS)); | 546 IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS)); |
| 542 resources.push_back(std::make_pair("denyWebView", IDR_WEB_VIEW_DENY_JS)); | 547 resources.push_back(std::make_pair("denyWebView", IDR_WEB_VIEW_DENY_JS)); |
| 543 resources.push_back( | 548 resources.push_back( |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 return v8::Handle<v8::Object>(); | 1369 return v8::Handle<v8::Object>(); |
| 1365 | 1370 |
| 1366 if (bind_name) | 1371 if (bind_name) |
| 1367 *bind_name = split.back(); | 1372 *bind_name = split.back(); |
| 1368 | 1373 |
| 1369 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) | 1374 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) |
| 1370 : bind_object; | 1375 : bind_object; |
| 1371 } | 1376 } |
| 1372 | 1377 |
| 1373 } // namespace extensions | 1378 } // namespace extensions |
| OLD | NEW |