| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 m_isUnderTest = true; | 287 m_isUnderTest = true; |
| 288 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents->inspect
orInspectorAgent()) | 288 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents->inspect
orInspectorAgent()) |
| 289 inspectorAgent->evaluateForTestInFrontend(callId, script); | 289 inspectorAgent->evaluateForTestInFrontend(callId, script); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void InspectorController::drawHighlight(GraphicsContext& context) const | 292 void InspectorController::drawHighlight(GraphicsContext& context) const |
| 293 { | 293 { |
| 294 m_overlay->paint(context); | 294 m_overlay->paint(context); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void InspectorController::getHighlight(Highlight* highlight) const | |
| 298 { | |
| 299 m_overlay->getHighlight(highlight); | |
| 300 } | |
| 301 | |
| 302 void InspectorController::inspect(Node* node) | 297 void InspectorController::inspect(Node* node) |
| 303 { | 298 { |
| 304 if (!node) | 299 if (!node) |
| 305 return; | 300 return; |
| 306 Document* document = node->ownerDocument(); | 301 Document* document = node->ownerDocument(); |
| 307 if (!document) | 302 if (!document) |
| 308 return; | 303 return; |
| 309 LocalFrame* frame = document->frame(); | 304 LocalFrame* frame = document->frame(); |
| 310 if (!frame) | 305 if (!frame) |
| 311 return; | 306 return; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 324 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents->inspect
orInspectorAgent()) | 319 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents->inspect
orInspectorAgent()) |
| 325 inspectorAgent->setInjectedScriptForOrigin(origin, source); | 320 inspectorAgent->setInjectedScriptForOrigin(origin, source); |
| 326 } | 321 } |
| 327 | 322 |
| 328 void InspectorController::dispatchMessageFromFrontend(const String& message) | 323 void InspectorController::dispatchMessageFromFrontend(const String& message) |
| 329 { | 324 { |
| 330 if (m_inspectorBackendDispatcher) | 325 if (m_inspectorBackendDispatcher) |
| 331 m_inspectorBackendDispatcher->dispatch(message); | 326 m_inspectorBackendDispatcher->dispatch(message); |
| 332 } | 327 } |
| 333 | 328 |
| 334 void InspectorController::hideHighlight() | |
| 335 { | |
| 336 m_overlay->hideHighlight(); | |
| 337 } | |
| 338 | |
| 339 Node* InspectorController::highlightedNode() const | |
| 340 { | |
| 341 return m_overlay->highlightedNode(); | |
| 342 } | |
| 343 | |
| 344 bool InspectorController::handleGestureEvent(LocalFrame* frame, const PlatformGe
stureEvent& event) | 329 bool InspectorController::handleGestureEvent(LocalFrame* frame, const PlatformGe
stureEvent& event) |
| 345 { | 330 { |
| 346 // Overlay should not consume events. | 331 // Overlay should not consume events. |
| 347 m_overlay->handleGestureEvent(event); | 332 m_overlay->handleGestureEvent(event); |
| 348 if (InspectorDOMAgent* domAgent = m_instrumentingAgents->inspectorDOMAgent()
) | 333 if (InspectorDOMAgent* domAgent = m_instrumentingAgents->inspectorDOMAgent()
) |
| 349 return domAgent->handleGestureEvent(frame, event); | 334 return domAgent->handleGestureEvent(frame, event); |
| 350 return false; | 335 return false; |
| 351 } | 336 } |
| 352 | 337 |
| 353 bool InspectorController::handleMouseEvent(LocalFrame* frame, const PlatformMous
eEvent& event) | 338 bool InspectorController::handleMouseEvent(LocalFrame* frame, const PlatformMous
eEvent& event) |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 m_layerTreeAgent->willAddPageOverlay(layer); | 468 m_layerTreeAgent->willAddPageOverlay(layer); |
| 484 } | 469 } |
| 485 | 470 |
| 486 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) | 471 void InspectorController::didRemovePageOverlay(const GraphicsLayer* layer) |
| 487 { | 472 { |
| 488 if (m_layerTreeAgent) | 473 if (m_layerTreeAgent) |
| 489 m_layerTreeAgent->didRemovePageOverlay(layer); | 474 m_layerTreeAgent->didRemovePageOverlay(layer); |
| 490 } | 475 } |
| 491 | 476 |
| 492 } // namespace WebCore | 477 } // namespace WebCore |
| OLD | NEW |