| Index: chrome/renderer/loadtimes_extension_bindings.h
|
| diff --git a/chrome/renderer/loadtimes_extension_bindings.h b/chrome/renderer/loadtimes_extension_bindings.h
|
| index c97b0b1d6eb63df3958b60a74eeb336893773444..ce994728ad7d8c414e80fad0ae28700555de770c 100644
|
| --- a/chrome/renderer/loadtimes_extension_bindings.h
|
| +++ b/chrome/renderer/loadtimes_extension_bindings.h
|
| @@ -8,15 +8,52 @@
|
| #ifndef CHROME_RENDERER_LOADTIMES_EXTENSION_BINDINGS_H_
|
| #define CHROME_RENDERER_LOADTIMES_EXTENSION_BINDINGS_H_
|
|
|
| -namespace v8 {
|
| -class Extension;
|
| +#include "content/public/renderer/render_frame_observer.h"
|
| +#include "gin/wrappable.h"
|
| +#include "v8/include/v8.h"
|
| +
|
| +namespace blink {
|
| +class WebFrame;
|
| }
|
|
|
| namespace extensions_v8 {
|
|
|
| -class LoadTimesExtension {
|
| +class LoadTimesExtensionHelper : public content::RenderFrameObserver {
|
| + public:
|
| + explicit LoadTimesExtensionHelper(content::RenderFrame* render_frame);
|
| +
|
| + // RenderFrameObserver:
|
| + void DidFinishLoad() override;
|
| +};
|
| +
|
| +class LoadTimesExtension : public gin::Wrappable<LoadTimesExtension> {
|
| public:
|
| - static v8::Extension* Get();
|
| + static gin::WrapperInfo kWrapperInfo;
|
| +
|
| + static void Install(blink::WebFrame* frame);
|
| +
|
| + private:
|
| + // gin::Wrappable:
|
| + gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
| + v8::Isolate* isolate) override;
|
| +
|
| + // Returns an object containing the following members:
|
| + // requestTime: The time the request to load the page was received.
|
| + // loadTime: The time the renderer started the load process.
|
| + // finishDocumentLoadTime: The time the document itself was loaded
|
| + // (this is before the onload() method is fired).
|
| + // finishLoadTime: The time all loading is done, after the onload()
|
| + // method and all resources.
|
| + // navigationType: A string describing what user action initiated the
|
| + // load.
|
| + v8::Local<v8::Object> LoadTimes();
|
| +
|
| + // Returns an object containing the following members:
|
| + // startE: The time the request to load the page was received.
|
| + // onloadT: The time the page finished loading.
|
| + // pageT: Elapsed time to load the page.
|
| + // tran: Page navigation type.
|
| + v8::Local<v8::Object> CSI();
|
| };
|
|
|
| } // namespace extensions_v8
|
|
|