| Index: third_party/WebKit/Source/core/frame/WebLocalFrameBase.h
|
| diff --git a/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h b/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h
|
| index 4c412122fca9dcd2ada1ddef45cb69df985a39c3..84ec20c5a045d0902d7d0866563ba342892d6c93 100644
|
| --- a/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h
|
| +++ b/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h
|
| @@ -1,14 +1,18 @@
|
| // Copyright 2017 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.#ifndef WebViewBase_h
|
| +// found in the LICENSE file.
|
|
|
| #ifndef WebLocalFrameBase_h
|
| #define WebLocalFrameBase_h
|
|
|
| +#include "core/CoreExport.h"
|
| +#include "public/platform/WebCommon.h"
|
| #include "public/web/WebLocalFrame.h"
|
|
|
| namespace blink {
|
|
|
| +class LocalFrame;
|
| +
|
| // WebLocalFrameBase is a temporary class the provides a layer of abstraction
|
| // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl
|
| // that are not overrides from WebLocalFrame will be declared pure virtual in
|
| @@ -18,9 +22,33 @@ namespace blink {
|
| // modules.
|
| // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/.
|
| class WebLocalFrameBase : public WebLocalFrame {
|
| + public:
|
| + // Creation Methods.
|
| + CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*);
|
| + CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&);
|
| +
|
| + // WebLocalFrame creation callbacks. These callbacks provide the means to
|
| + // keep WebLocalFrameBase separate from WebLocalFrameImpl. On process
|
| + // initialization it is expected that the correct callbacks are registered
|
| + // so that WebLocalFrameBase can instantiate the concrete class.
|
| + using CreateFromLocalFramePtrCallback = WebLocalFrameBase* (*)(LocalFrame*);
|
| + using CreateFromLocalFrameRefCallback = WebLocalFrameBase* (*)(LocalFrame&);
|
| +
|
| + CORE_EXPORT static void RegisterCreateFromLocalFramePtrCallback(
|
| + CreateFromLocalFramePtrCallback);
|
| + CORE_EXPORT static void RegisterCreateFromLocalFrameRefCallback(
|
| + CreateFromLocalFrameRefCallback);
|
| +
|
| + virtual WebFrameClient* Client() const = 0;
|
| +
|
| protected:
|
| explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {}
|
| +
|
| + private:
|
| + static CreateFromLocalFramePtrCallback create_local_frame_ptr_callback_;
|
| + static CreateFromLocalFrameRefCallback create_local_frame_ref_callback_;
|
| };
|
| -}
|
| +
|
| +} // namespace blink
|
|
|
| #endif // WebLocalFrameBase_h
|
|
|