| OLD | NEW |
| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 WebDevToolsFrontendImpl::WebDevToolsFrontendImpl( | 91 WebDevToolsFrontendImpl::WebDevToolsFrontendImpl( |
| 92 WebViewImpl* webViewImpl, | 92 WebViewImpl* webViewImpl, |
| 93 WebDevToolsFrontendClient* client, | 93 WebDevToolsFrontendClient* client, |
| 94 const String& applicationLocale) | 94 const String& applicationLocale) |
| 95 : m_webViewImpl(webViewImpl) | 95 : m_webViewImpl(webViewImpl) |
| 96 , m_client(client) | 96 , m_client(client) |
| 97 , m_applicationLocale(applicationLocale) | 97 , m_applicationLocale(applicationLocale) |
| 98 , m_inspectorFrontendDispatchTimer(this, &WebDevToolsFrontendImpl::maybeDisp
atch) | 98 , m_inspectorFrontendDispatchTimer(this, &WebDevToolsFrontendImpl::maybeDisp
atch) |
| 99 { | 99 { |
| 100 m_webViewImpl->page()->inspectorController().setInspectorFrontendClient(adop
tPtr(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client, this))); | 100 m_webViewImpl->page()->inspectorController().setInspectorFrontendClient(adop
tPtrWillBeNoop(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client,
this))); |
| 101 } | 101 } |
| 102 | 102 |
| 103 WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl() | 103 WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl() |
| 104 { | 104 { |
| 105 } | 105 } |
| 106 | 106 |
| 107 void WebDevToolsFrontendImpl::dispatchOnInspectorFrontend(const WebString& messa
ge) | 107 void WebDevToolsFrontendImpl::dispatchOnInspectorFrontend(const WebString& messa
ge) |
| 108 { | 108 { |
| 109 m_messages.append(message); | 109 m_messages.append(message); |
| 110 maybeDispatch(0); | 110 maybeDispatch(0); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF
unction); | 159 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF
unction); |
| 160 Vector< v8::Handle<v8::Value> > args; | 160 Vector< v8::Handle<v8::Value> > args; |
| 161 args.append(v8String(isolate, message)); | 161 args.append(v8String(isolate, message)); |
| 162 v8::TryCatch tryCatch; | 162 v8::TryCatch tryCatch; |
| 163 tryCatch.SetVerbose(true); | 163 tryCatch.SetVerbose(true); |
| 164 ScriptController::callFunction(frame->frame()->document(), function, dispatc
herObject, args.size(), args.data(), isolate); | 164 ScriptController::callFunction(frame->frame()->document(), function, dispatc
herObject, args.size(), args.data(), isolate); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |