OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 m_client = 0; | 129 m_client = 0; |
130 if (m_menuProvider) | 130 if (m_menuProvider) |
131 m_menuProvider->disconnect(); | 131 m_menuProvider->disconnect(); |
132 m_frontendPage = 0; | 132 m_frontendPage = 0; |
133 } | 133 } |
134 | 134 |
135 void InspectorFrontendHost::loaded() | 135 void InspectorFrontendHost::loaded() |
136 { | 136 { |
137 } | 137 } |
138 | 138 |
139 void InspectorFrontendHost::requestSetDockSide(const String& side) | |
140 { | |
141 if (!m_client) | |
142 return; | |
143 if (side == "undocked") | |
144 m_client->requestSetDockSide(InspectorFrontendClient::Undocked); | |
pfeldman
2013/08/23 11:34:15
Remove these constants as well.
Vladislav Kaznacheev
2013/08/30 14:37:00
Done.
| |
145 else if (side == "right") | |
146 m_client->requestSetDockSide(InspectorFrontendClient::DockedToRight); | |
147 else if (side == "bottom") | |
148 m_client->requestSetDockSide(InspectorFrontendClient::DockedToBottom); | |
149 } | |
150 | |
151 void InspectorFrontendHost::closeWindow() | |
152 { | |
153 if (m_client) { | |
154 m_client->closeWindow(); | |
155 disconnectClient(); // Disconnect from client. | |
pfeldman
2013/08/23 11:34:15
This was also clearing m_client. Leave it as is an
Vladislav Kaznacheev
2013/08/30 14:37:00
Done in the previous patch, already committed (htt
| |
156 } | |
157 } | |
158 | |
159 void InspectorFrontendHost::bringToFront() | |
160 { | |
161 if (m_client) | |
162 m_client->bringToFront(); | |
163 } | |
164 | |
165 void InspectorFrontendHost::setZoomFactor(float zoom) | 139 void InspectorFrontendHost::setZoomFactor(float zoom) |
166 { | 140 { |
167 m_frontendPage->mainFrame()->setPageAndTextZoomFactors(zoom, 1); | 141 m_frontendPage->mainFrame()->setPageAndTextZoomFactors(zoom, 1); |
168 } | 142 } |
169 | 143 |
170 void InspectorFrontendHost::inspectedURLChanged(const String& newURL) | 144 void InspectorFrontendHost::inspectedURLChanged(const String& newURL) |
171 { | 145 { |
172 if (m_client) | 146 if (m_client) |
173 m_client->inspectedURLChanged(newURL); | 147 m_client->inspectedURLChanged(newURL); |
174 } | 148 } |
175 | 149 |
176 void InspectorFrontendHost::setAttachedWindowHeight(unsigned height) | |
177 { | |
178 if (m_client) | |
179 m_client->changeAttachedWindowHeight(height); | |
180 } | |
181 | |
182 void InspectorFrontendHost::moveWindowBy(float x, float y) const | |
183 { | |
184 if (m_client) | |
185 m_client->moveWindowBy(x, y); | |
186 } | |
187 | |
188 void InspectorFrontendHost::setInjectedScriptForOrigin(const String& origin, con st String& script) | 150 void InspectorFrontendHost::setInjectedScriptForOrigin(const String& origin, con st String& script) |
189 { | 151 { |
190 m_frontendPage->inspectorController().setInjectedScriptForOrigin(origin, scr ipt); | 152 m_frontendPage->inspectorController().setInjectedScriptForOrigin(origin, scr ipt); |
191 } | 153 } |
192 | 154 |
193 String InspectorFrontendHost::localizedStringsURL() | 155 String InspectorFrontendHost::localizedStringsURL() |
194 { | 156 { |
195 return ""; | 157 return ""; |
196 } | 158 } |
197 | 159 |
198 void InspectorFrontendHost::copyText(const String& text) | 160 void InspectorFrontendHost::copyText(const String& text) |
199 { | 161 { |
200 Pasteboard::generalPasteboard()->writePlainText(text, Pasteboard::CannotSmar tReplace); | 162 Pasteboard::generalPasteboard()->writePlainText(text, Pasteboard::CannotSmar tReplace); |
201 } | 163 } |
202 | 164 |
203 void InspectorFrontendHost::openInNewTab(const String& url) | |
204 { | |
205 if (m_client) | |
206 m_client->openInNewTab(url); | |
207 } | |
208 | |
209 bool InspectorFrontendHost::canSave() | 165 bool InspectorFrontendHost::canSave() |
210 { | 166 { |
211 return true; | 167 return true; |
212 } | 168 } |
213 | 169 |
214 void InspectorFrontendHost::save(const String& url, const String& content, bool forceSaveAs) | |
215 { | |
216 if (m_client) | |
217 m_client->save(url, content, forceSaveAs); | |
218 } | |
219 | |
220 void InspectorFrontendHost::append(const String& url, const String& content) | |
221 { | |
222 if (m_client) | |
223 m_client->append(url, content); | |
224 } | |
225 | |
226 void InspectorFrontendHost::close(const String&) | 170 void InspectorFrontendHost::close(const String&) |
227 { | 171 { |
228 } | 172 } |
229 | 173 |
230 void InspectorFrontendHost::sendMessageToBackend(const String& message) | 174 void InspectorFrontendHost::sendMessageToBackend(const String& message) |
231 { | 175 { |
232 if (m_client) | 176 if (m_client) |
233 m_client->sendMessageToBackend(message); | 177 m_client->sendMessageToBackend(message); |
234 } | 178 } |
235 | 179 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 { | 229 { |
286 Color color = m_frontendPage->theme()->activeSelectionForegroundColor(); | 230 Color color = m_frontendPage->theme()->activeSelectionForegroundColor(); |
287 return color != Color::transparent ? color.serialized() : ""; | 231 return color != Color::transparent ? color.serialized() : ""; |
288 } | 232 } |
289 | 233 |
290 bool InspectorFrontendHost::supportsFileSystems() | 234 bool InspectorFrontendHost::supportsFileSystems() |
291 { | 235 { |
292 return true; | 236 return true; |
293 } | 237 } |
294 | 238 |
295 void InspectorFrontendHost::requestFileSystems() | |
296 { | |
297 if (m_client) | |
298 m_client->requestFileSystems(); | |
299 } | |
300 | |
301 void InspectorFrontendHost::addFileSystem() | |
302 { | |
303 if (m_client) | |
304 m_client->addFileSystem(); | |
305 } | |
306 | |
307 void InspectorFrontendHost::removeFileSystem(const String& fileSystemPath) | |
308 { | |
309 if (m_client) | |
310 m_client->removeFileSystem(fileSystemPath); | |
311 } | |
312 | |
313 PassRefPtr<DOMFileSystem> InspectorFrontendHost::isolatedFileSystem(const String & fileSystemName, const String& rootURL) | 239 PassRefPtr<DOMFileSystem> InspectorFrontendHost::isolatedFileSystem(const String & fileSystemName, const String& rootURL) |
314 { | 240 { |
315 ScriptExecutionContext* context = m_frontendPage->mainFrame()->document(); | 241 ScriptExecutionContext* context = m_frontendPage->mainFrame()->document(); |
316 return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated , KURL(ParsedURLString, rootURL), AsyncFileSystem::create()); | 242 return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated , KURL(ParsedURLString, rootURL), AsyncFileSystem::create()); |
317 } | 243 } |
318 | 244 |
319 void InspectorFrontendHost::indexPath(int requestId, const String& fileSystemPat h) | |
320 { | |
321 if (m_client) | |
322 m_client->indexPath(requestId, fileSystemPath); | |
323 } | |
324 | |
325 void InspectorFrontendHost::stopIndexing(int requestId) | |
326 { | |
327 if (m_client) | |
328 m_client->stopIndexing(requestId); | |
329 } | |
330 | |
331 void InspectorFrontendHost::searchInPath(int requestId, const String& fileSystem Path, const String& query) | |
332 { | |
333 if (m_client) | |
334 m_client->searchInPath(requestId, fileSystemPath, query); | |
335 } | |
336 | |
337 bool InspectorFrontendHost::isUnderTest() | 245 bool InspectorFrontendHost::isUnderTest() |
338 { | 246 { |
339 return m_client && m_client->isUnderTest(); | 247 return m_client && m_client->isUnderTest(); |
340 } | 248 } |
341 | 249 |
342 bool InspectorFrontendHost::canSaveAs() | 250 bool InspectorFrontendHost::canSaveAs() |
343 { | 251 { |
344 return false; | 252 return false; |
345 } | 253 } |
346 | 254 |
347 bool InspectorFrontendHost::canInspectWorkers() | 255 bool InspectorFrontendHost::canInspectWorkers() |
348 { | 256 { |
349 return false; | 257 return false; |
350 } | 258 } |
351 | 259 |
352 String InspectorFrontendHost::hiddenPanels() | 260 String InspectorFrontendHost::hiddenPanels() |
353 { | 261 { |
354 return ""; | 262 return ""; |
355 } | 263 } |
356 | 264 |
357 } // namespace WebCore | 265 } // namespace WebCore |
OLD | NEW |