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/dispatcher.h" | 5 #include "chrome/renderer/extensions/dispatcher.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 source_map_.RegisterSource("sendRequest", IDR_SEND_REQUEST_JS); | 978 source_map_.RegisterSource("sendRequest", IDR_SEND_REQUEST_JS); |
979 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS); | 979 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS); |
980 source_map_.RegisterSource("test", IDR_TEST_CUSTOM_BINDINGS_JS); | 980 source_map_.RegisterSource("test", IDR_TEST_CUSTOM_BINDINGS_JS); |
981 source_map_.RegisterSource("unload_event", IDR_UNLOAD_EVENT_JS); | 981 source_map_.RegisterSource("unload_event", IDR_UNLOAD_EVENT_JS); |
982 source_map_.RegisterSource("utils", IDR_UTILS_JS); | 982 source_map_.RegisterSource("utils", IDR_UTILS_JS); |
983 | 983 |
984 // Custom bindings. | 984 // Custom bindings. |
985 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS); | 985 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS); |
986 source_map_.RegisterSource("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS); | 986 source_map_.RegisterSource("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS); |
987 source_map_.RegisterSource("app.window", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS); | 987 source_map_.RegisterSource("app.window", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS); |
988 source_map_.RegisterSource("bluetooth", IDR_BLUETOOTH_CUSTOM_BINDINGS_JS); | |
989 source_map_.RegisterSource("browserAction", | 988 source_map_.RegisterSource("browserAction", |
990 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS); | 989 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS); |
991 source_map_.RegisterSource("contextMenus", | 990 source_map_.RegisterSource("contextMenus", |
992 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS); | 991 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS); |
993 source_map_.RegisterSource("declarativeContent", | 992 source_map_.RegisterSource("declarativeContent", |
994 IDR_DECLARATIVE_CONTENT_CUSTOM_BINDINGS_JS); | 993 IDR_DECLARATIVE_CONTENT_CUSTOM_BINDINGS_JS); |
995 source_map_.RegisterSource("declarativeWebRequest", | 994 source_map_.RegisterSource("declarativeWebRequest", |
996 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS); | 995 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS); |
997 source_map_.RegisterSource("desktopCapture", | 996 source_map_.RegisterSource("desktopCapture", |
998 IDR_DESKTOP_CAPTURE_CUSTOM_BINDINGS_JS); | 997 IDR_DESKTOP_CAPTURE_CUSTOM_BINDINGS_JS); |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 } | 1687 } |
1689 | 1688 |
1690 void Dispatcher::ClearPortData(int port_id) { | 1689 void Dispatcher::ClearPortData(int port_id) { |
1691 // Only the target port side has entries in |port_to_tab_id_map_|. If | 1690 // Only the target port side has entries in |port_to_tab_id_map_|. If |
1692 // |port_id| is a source port, std::map::erase() will just silently fail | 1691 // |port_id| is a source port, std::map::erase() will just silently fail |
1693 // here as a no-op. | 1692 // here as a no-op. |
1694 port_to_tab_id_map_.erase(port_id); | 1693 port_to_tab_id_map_.erase(port_id); |
1695 } | 1694 } |
1696 | 1695 |
1697 } // namespace extensions | 1696 } // namespace extensions |
OLD | NEW |