| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 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 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA
gent(); | 1548 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA
gent(); |
| 1549 if (!consoleAgent) | 1549 if (!consoleAgent) |
| 1550 return Vector<String>(); | 1550 return Vector<String>(); |
| 1551 Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts(); | 1551 Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts(); |
| 1552 Vector<String> result(counts.size()); | 1552 Vector<String> result(counts.size()); |
| 1553 for (size_t i = 0; i < counts.size(); i++) | 1553 for (size_t i = 0; i < counts.size(); i++) |
| 1554 result[i] = String::number(counts[i]); | 1554 result[i] = String::number(counts[i]); |
| 1555 return result; | 1555 return result; |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 PassRefPtr<DOMWindow> Internals::openDummyInspectorFrontend(const String& url) | 1558 PassRefPtrWillBeRawPtr<DOMWindow> Internals::openDummyInspectorFrontend(const St
ring& url) |
| 1559 { | 1559 { |
| 1560 Page* page = contextDocument()->frame()->page(); | 1560 Page* page = contextDocument()->frame()->page(); |
| 1561 ASSERT(page); | 1561 ASSERT(page); |
| 1562 | 1562 |
| 1563 DOMWindow* window = page->mainFrame()->domWindow(); | 1563 DOMWindow* window = page->mainFrame()->domWindow(); |
| 1564 ASSERT(window); | 1564 ASSERT(window); |
| 1565 | 1565 |
| 1566 m_frontendWindow = window->open(url, "", "", window, window); | 1566 m_frontendWindow = window->open(url, "", "", window, window); |
| 1567 ASSERT(m_frontendWindow); | 1567 ASSERT(m_frontendWindow); |
| 1568 | 1568 |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 return promise; | 2413 return promise; |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) | 2416 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) |
| 2417 { | 2417 { |
| 2418 return promise.then(AddOneFunction::create(context)); | 2418 return promise.then(AddOneFunction::create(context)); |
| 2419 } | 2419 } |
| 2420 | 2420 |
| 2421 void Internals::trace(Visitor* visitor) | 2421 void Internals::trace(Visitor* visitor) |
| 2422 { | 2422 { |
| 2423 visitor->trace(m_frontendWindow); |
| 2423 visitor->trace(m_runtimeFlags); | 2424 visitor->trace(m_runtimeFlags); |
| 2424 visitor->trace(m_profilers); | 2425 visitor->trace(m_profilers); |
| 2425 } | 2426 } |
| 2426 | 2427 |
| 2427 void Internals::startSpeechInput(Element* element) | 2428 void Internals::startSpeechInput(Element* element) |
| 2428 { | 2429 { |
| 2429 #if ENABLE(INPUT_SPEECH) | 2430 #if ENABLE(INPUT_SPEECH) |
| 2430 HTMLInputElement* input = toHTMLInputElement(element); | 2431 HTMLInputElement* input = toHTMLInputElement(element); |
| 2431 if (!input->isSpeechEnabled()) | 2432 if (!input->isSpeechEnabled()) |
| 2432 return; | 2433 return; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2445 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2446 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
| 2446 { | 2447 { |
| 2447 if (!node) | 2448 if (!node) |
| 2448 return String(); | 2449 return String(); |
| 2449 blink::WebPoint point(x, y); | 2450 blink::WebPoint point(x, y); |
| 2450 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); | 2451 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); |
| 2451 return surroundingText.content(); | 2452 return surroundingText.content(); |
| 2452 } | 2453 } |
| 2453 | 2454 |
| 2454 } | 2455 } |
| OLD | NEW |