| Index: third_party/WebKit/Source/web/InspectorOverlay.cpp
|
| diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
|
| index 01f2fb5b7624f26ebe389bc77370b400040ee56e..3d380b7ea02502132f9a1c66750dd305fb60c99a 100644
|
| --- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
|
| +++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
|
| @@ -400,9 +400,9 @@ void InspectorOverlay::rebuildOverlayPage()
|
| m_layoutEditor->rebuild();
|
| }
|
|
|
| -static PassRefPtr<protocol::DictionaryValue> buildObjectForSize(const IntSize& size)
|
| +static PassOwnPtr<protocol::DictionaryValue> buildObjectForSize(const IntSize& size)
|
| {
|
| - RefPtr<protocol::DictionaryValue> result = protocol::DictionaryValue::create();
|
| + OwnPtr<protocol::DictionaryValue> result = protocol::DictionaryValue::create();
|
| result->setNumber("width", size.width());
|
| result->setNumber("height", size.height());
|
| return result.release();
|
| @@ -425,7 +425,7 @@ void InspectorOverlay::drawNodeHighlight()
|
| for (unsigned i = 0; i < elements->length(); ++i) {
|
| Element* element = elements->item(i);
|
| InspectorHighlight highlight(element, m_nodeHighlightConfig, false);
|
| - RefPtr<protocol::DictionaryValue> highlightJSON = highlight.asProtocolValue();
|
| + OwnPtr<protocol::DictionaryValue> highlightJSON = highlight.asProtocolValue();
|
| evaluateInOverlay("drawHighlight", highlightJSON.release());
|
| }
|
| }
|
| @@ -435,7 +435,7 @@ void InspectorOverlay::drawNodeHighlight()
|
| if (m_eventTargetNode)
|
| highlight.appendEventTargetQuads(m_eventTargetNode.get(), m_nodeHighlightConfig);
|
|
|
| - RefPtr<protocol::DictionaryValue> highlightJSON = highlight.asProtocolValue();
|
| + OwnPtr<protocol::DictionaryValue> highlightJSON = highlight.asProtocolValue();
|
| evaluateInOverlay("drawHighlight", highlightJSON.release());
|
| }
|
|
|
| @@ -532,7 +532,7 @@ LocalFrame* InspectorOverlay::overlayMainFrame()
|
|
|
| void InspectorOverlay::reset(const IntSize& viewportSize, const IntPoint& documentScrollOffset)
|
| {
|
| - RefPtr<protocol::DictionaryValue> resetData = protocol::DictionaryValue::create();
|
| + OwnPtr<protocol::DictionaryValue> resetData = protocol::DictionaryValue::create();
|
| resetData->setNumber("deviceScaleFactor", m_webViewImpl->page()->deviceScaleFactor());
|
| resetData->setNumber("pageScaleFactor", m_webViewImpl->page()->pageScaleFactor());
|
| resetData->setObject("viewportSize", buildObjectForSize(viewportSize));
|
| @@ -545,16 +545,16 @@ void InspectorOverlay::reset(const IntSize& viewportSize, const IntPoint& docume
|
| void InspectorOverlay::evaluateInOverlay(const String& method, const String& argument)
|
| {
|
| ScriptForbiddenScope::AllowUserAgentScript allowScript;
|
| - RefPtr<protocol::ListValue> command = protocol::ListValue::create();
|
| + OwnPtr<protocol::ListValue> command = protocol::ListValue::create();
|
| command->pushValue(protocol::StringValue::create(method));
|
| command->pushValue(protocol::StringValue::create(argument));
|
| toLocalFrame(overlayPage()->mainFrame())->script().executeScriptInMainWorld("dispatch(" + command->toJSONString() + ")", ScriptController::ExecuteScriptWhenScriptsDisabled);
|
| }
|
|
|
| -void InspectorOverlay::evaluateInOverlay(const String& method, PassRefPtr<protocol::Value> argument)
|
| +void InspectorOverlay::evaluateInOverlay(const String& method, PassOwnPtr<protocol::Value> argument)
|
| {
|
| ScriptForbiddenScope::AllowUserAgentScript allowScript;
|
| - RefPtr<protocol::ListValue> command = protocol::ListValue::create();
|
| + OwnPtr<protocol::ListValue> command = protocol::ListValue::create();
|
| command->pushValue(protocol::StringValue::create(method));
|
| command->pushValue(argument);
|
| toLocalFrame(overlayPage()->mainFrame())->script().executeScriptInMainWorld("dispatch(" + command->toJSONString() + ")", ScriptController::ExecuteScriptWhenScriptsDisabled);
|
|
|