| Index: third_party/WebKit/Source/core/probe/CoreProbes.h
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.h b/third_party/WebKit/Source/core/probe/CoreProbes.h
|
| similarity index 41%
|
| rename from third_party/WebKit/Source/core/inspector/InspectorInstrumentation.h
|
| rename to third_party/WebKit/Source/core/probe/CoreProbes.h
|
| index 8656b3fd49208c2ecc1f793cace65618676f0d40..c9a0b0c1e2d959ad788efcfd30be522736acdff0 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.h
|
| +++ b/third_party/WebKit/Source/core/probe/CoreProbes.h
|
| @@ -1,64 +1,52 @@
|
| /*
|
| -* Copyright (C) 2010 Google Inc. All rights reserved.
|
| -*
|
| -* Redistribution and use in source and binary forms, with or without
|
| -* modification, are permitted provided that the following conditions are
|
| -* met:
|
| -*
|
| -* * Redistributions of source code must retain the above copyright
|
| -* notice, this list of conditions and the following disclaimer.
|
| -* * Redistributions in binary form must reproduce the above
|
| -* copyright notice, this list of conditions and the following disclaimer
|
| -* in the documentation and/or other materials provided with the
|
| -* distribution.
|
| -* * Neither the name of Google Inc. nor the names of its
|
| -* contributors may be used to endorse or promote products derived from
|
| -* this software without specific prior written permission.
|
| -*
|
| -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| -*/
|
| -
|
| -#ifndef InspectorInstrumentation_h
|
| -#define InspectorInstrumentation_h
|
| + * Copyright (C) 2010 Google Inc. All rights reserved.
|
| + *
|
| + * Redistribution and use in source and binary forms, with or without
|
| + * modification, are permitted provided that the following conditions are
|
| + * met:
|
| + *
|
| + * * Redistributions of source code must retain the above copyright
|
| + * notice, this list of conditions and the following disclaimer.
|
| + * * Redistributions in binary form must reproduce the above
|
| + * copyright notice, this list of conditions and the following disclaimer
|
| + * in the documentation and/or other materials provided with the
|
| + * distribution.
|
| + * * Neither the name of Google Inc. nor the names of its
|
| + * contributors may be used to endorse or promote products derived from
|
| + * this software without specific prior written permission.
|
| + *
|
| + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| + */
|
| +
|
| +#ifndef CoreProbes_h
|
| +#define CoreProbes_h
|
|
|
| #include "core/CoreExport.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/Node.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/page/ChromeClient.h"
|
| +#include "platform/probe/PlatformProbes.h"
|
|
|
| namespace blink {
|
|
|
| -class InspectorInstrumentationAgents;
|
| +class CoreProbeSink;
|
| class Resource;
|
| class ThreadDebugger;
|
| class WorkerGlobalScope;
|
|
|
| namespace probe {
|
|
|
| -class CORE_EXPORT ProbeBase {
|
| - STACK_ALLOCATED()
|
| -
|
| - public:
|
| - double captureStartTime() const;
|
| - double captureEndTime() const;
|
| - double duration() const;
|
| -
|
| - private:
|
| - mutable double m_startTime = 0;
|
| - mutable double m_endTime = 0;
|
| -};
|
| -
|
| class CORE_EXPORT AsyncTask {
|
| STACK_ALLOCATED();
|
|
|
| @@ -76,47 +64,39 @@ class CORE_EXPORT AsyncTask {
|
| };
|
|
|
| // Called from generated instrumentation code.
|
| -CORE_EXPORT InspectorInstrumentationAgents* instrumentingAgentsFor(
|
| - WorkerGlobalScope*);
|
| -CORE_EXPORT InspectorInstrumentationAgents*
|
| -instrumentingAgentsForNonDocumentContext(ExecutionContext*);
|
| +CORE_EXPORT CoreProbeSink* toCoreProbeSink(WorkerGlobalScope*);
|
| +CORE_EXPORT CoreProbeSink* toCoreProbeSinkForNonDocumentContext(
|
| + ExecutionContext*);
|
|
|
| -inline InspectorInstrumentationAgents* instrumentingAgentsFor(
|
| - LocalFrame* frame) {
|
| +inline CoreProbeSink* toCoreProbeSink(LocalFrame* frame) {
|
| return frame ? frame->instrumentingAgents() : nullptr;
|
| }
|
|
|
| -inline InspectorInstrumentationAgents* instrumentingAgentsFor(
|
| - Document& document) {
|
| +inline CoreProbeSink* toCoreProbeSink(Document& document) {
|
| LocalFrame* frame = document.frame();
|
| if (!frame && document.templateDocumentHost())
|
| frame = document.templateDocumentHost()->frame();
|
| - return instrumentingAgentsFor(frame);
|
| + return toCoreProbeSink(frame);
|
| }
|
|
|
| -inline InspectorInstrumentationAgents* instrumentingAgentsFor(
|
| - Document* document) {
|
| - return document ? instrumentingAgentsFor(*document) : nullptr;
|
| +inline CoreProbeSink* toCoreProbeSink(Document* document) {
|
| + return document ? toCoreProbeSink(*document) : nullptr;
|
| }
|
|
|
| -inline InspectorInstrumentationAgents* instrumentingAgentsFor(
|
| - ExecutionContext* context) {
|
| +inline CoreProbeSink* toCoreProbeSink(ExecutionContext* context) {
|
| if (!context)
|
| return nullptr;
|
| - return context->isDocument()
|
| - ? instrumentingAgentsFor(*toDocument(context))
|
| - : instrumentingAgentsForNonDocumentContext(context);
|
| + return context->isDocument() ? toCoreProbeSink(*toDocument(context))
|
| + : toCoreProbeSinkForNonDocumentContext(context);
|
| }
|
|
|
| -inline InspectorInstrumentationAgents* instrumentingAgentsFor(Node* node) {
|
| - return node ? instrumentingAgentsFor(node->document()) : nullptr;
|
| +inline CoreProbeSink* toCoreProbeSink(Node* node) {
|
| + return node ? toCoreProbeSink(node->document()) : nullptr;
|
| }
|
|
|
| -inline InspectorInstrumentationAgents* instrumentingAgentsFor(
|
| - EventTarget* eventTarget) {
|
| - return eventTarget
|
| - ? instrumentingAgentsFor(eventTarget->getExecutionContext())
|
| - : nullptr;
|
| +inline CoreProbeSink* toCoreProbeSink(EventTarget* eventTarget) {
|
| + return eventTarget ? toCoreProbeSink(eventTarget->getExecutionContext())
|
| + : nullptr;
|
| }
|
|
|
| CORE_EXPORT void asyncTaskScheduled(ExecutionContext*,
|
| @@ -145,7 +125,9 @@ CORE_EXPORT void continueWithPolicyIgnore(LocalFrame*,
|
| } // namespace probe
|
| } // namespace blink
|
|
|
| -#include "core/InspectorInstrumentationInl.h"
|
| +#undef PROBE_EXPORT
|
| +
|
| +#include "core/CoreProbesInl.h"
|
| #include "core/InspectorOverridesInl.h"
|
|
|
| -#endif // !defined(InspectorInstrumentation_h)
|
| +#endif // !defined(CoreProbes_h)
|
|
|