Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: Source/web/InspectorFrontendClientImpl.cpp

Issue 423673004: [DevTools] Switch from separate sendMessageToBackend method to using embedder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/InspectorFrontendClientImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 " ['inspectElementCompleted', 0]," 126 " ['inspectElementCompleted', 0],"
127 " ['inspectedURLChanged', 1]," 127 " ['inspectedURLChanged', 1],"
128 " ['moveWindowBy', 2]," 128 " ['moveWindowBy', 2],"
129 " ['openInNewTab', 1]," 129 " ['openInNewTab', 1],"
130 " ['openUrlOnRemoteDeviceAndInspect', 2]," 130 " ['openUrlOnRemoteDeviceAndInspect', 2],"
131 " ['removeFileSystem', 1]," 131 " ['removeFileSystem', 1],"
132 " ['requestFileSystems', 0]," 132 " ['requestFileSystems', 0],"
133 " ['resetZoom', 0]," 133 " ['resetZoom', 0],"
134 " ['save', 3]," 134 " ['save', 3],"
135 " ['searchInPath', 3]," 135 " ['searchInPath', 3],"
136 " ['sendMessageToBrowser', 1],"
136 " ['setDeviceCountUpdatesEnabled', 1]," 137 " ['setDeviceCountUpdatesEnabled', 1],"
137 " ['setDevicesUpdatesEnabled', 1]," 138 " ['setDevicesUpdatesEnabled', 1],"
138 " ['setWhitelistedShortcuts', 1]," 139 " ['setWhitelistedShortcuts', 1],"
139 " ['setContentsResizingStrategy', 2]," 140 " ['setContentsResizingStrategy', 2],"
140 " ['setInspectedPageBounds', 1]," 141 " ['setInspectedPageBounds', 1],"
141 " ['setIsDocked', 1]," 142 " ['setIsDocked', 1],"
142 " ['stopIndexing', 1]," 143 " ['stopIndexing', 1],"
143 " ['zoomIn', 0]," 144 " ['zoomIn', 0],"
144 " ['zoomOut', 0]]);" 145 " ['zoomOut', 0]]);"
145 "" 146 ""
147 "" // Support for legacy front-ends (<M38). Do not add items here.
148 "InspectorFrontendHost.sendMessageToBackend = function(message)"
149 "{"
150 " InspectorFrontendHost.sendMessageToBrowser(message);"
151 "};"
152 ""
146 "" // Support for legacy front-ends (<M34). Do not add items here. 153 "" // Support for legacy front-ends (<M34). Do not add items here.
147 "InspectorFrontendHost.requestSetDockSide = function(dockSide)" 154 "InspectorFrontendHost.requestSetDockSide = function(dockSide)"
148 "{" 155 "{"
149 " InspectorFrontendHost.setIsDocked(dockSide !== \"undocked\");" 156 " InspectorFrontendHost.setIsDocked(dockSide !== \"undocked\");"
150 "};" 157 "};"
151 "InspectorFrontendHost.supportsFileSystems = function() { return tru e; };" 158 "InspectorFrontendHost.supportsFileSystems = function() { return tru e; };"
152 "" 159 ""
153 "" // Support for legacy front-ends (<M28). Do not add items here. 160 "" // Support for legacy front-ends (<M28). Do not add items here.
154 "InspectorFrontendHost.canInspectWorkers = function() { return true; };" 161 "InspectorFrontendHost.canInspectWorkers = function() { return true; };"
155 "InspectorFrontendHost.canSaveAs = function() { return true; };" 162 "InspectorFrontendHost.canSaveAs = function() { return true; };"
156 "InspectorFrontendHost.canSave = function() { return true; };" 163 "InspectorFrontendHost.canSave = function() { return true; };"
157 "InspectorFrontendHost.loaded = function() {};" 164 "InspectorFrontendHost.loaded = function() {};"
158 "InspectorFrontendHost.hiddenPanels = function() { return ""; };" 165 "InspectorFrontendHost.hiddenPanels = function() { return ""; };"
159 "InspectorFrontendHost.localizedStringsURL = function() { return ""; };" 166 "InspectorFrontendHost.localizedStringsURL = function() { return ""; };"
160 "InspectorFrontendHost.close = function(url) { };"; 167 "InspectorFrontendHost.close = function(url) { };";
161 scriptController->executeScriptInMainWorld(installAdditionalAPI, ScriptC ontroller::ExecuteScriptWhenScriptsDisabled); 168 scriptController->executeScriptInMainWorld(installAdditionalAPI, ScriptC ontroller::ExecuteScriptWhenScriptsDisabled);
162 } 169 }
163 } 170 }
164 171
165 void InspectorFrontendClientImpl::sendMessageToBackend(const String& message)
166 {
167 m_client->sendMessageToBackend(message);
168 }
169
170 void InspectorFrontendClientImpl::sendMessageToEmbedder(const String& message) 172 void InspectorFrontendClientImpl::sendMessageToEmbedder(const String& message)
171 { 173 {
172 m_client->sendMessageToEmbedder(message); 174 m_client->sendMessageToEmbedder(message);
173 } 175 }
174 176
175 bool InspectorFrontendClientImpl::isUnderTest() 177 bool InspectorFrontendClientImpl::isUnderTest()
176 { 178 {
177 return m_client->isUnderTest(); 179 return m_client->isUnderTest();
178 } 180 }
179 181
180 } // namespace blink 182 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/InspectorFrontendClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698