Chromium Code Reviews| Index: third_party/WebKit/Source/core/WebFactory.h |
| diff --git a/third_party/WebKit/Source/core/WebFactory.h b/third_party/WebKit/Source/core/WebFactory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a3be14d696f6ff1038a85c084aa63f112bfb0ef4 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/WebFactory.h |
| @@ -0,0 +1,35 @@ |
| +// 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 WebFactory_h |
| +#define WebFactory_h |
|
dcheng
2017/05/17 04:35:58
Maybe this file should be in page? What other clas
slangley
2017/05/17 04:39:44
We'll use this class to construct many of the web/
sashab
2017/05/22 03:45:05
Yeah, where do you think this file belongs? I was
|
| + |
| +#include "core/CoreExport.h" |
| +#include "public/platform/WebPageVisibilityState.h" |
| + |
| +namespace blink { |
| + |
| +class ChromeClient; |
| +class WebViewBase; |
| +class WebViewClient; |
| + |
| +// WebFactory is a temporary class implemented in web/ that allows classes to |
| +// construct interfaces that are being moved out of web/. |
| +// This class will be removed once all implementations are in core/ or modules/. |
| +class CORE_EXPORT WebFactory { |
| + public: |
| + // Takes ownership of |factory|. |
| + CORE_EXPORT static void SetInstance(WebFactory*); |
|
slangley
2017/05/17 04:39:44
not sure if you need these additional CORE_EXPORT
sashab
2017/05/22 03:45:05
Removed.
|
| + CORE_EXPORT static WebFactory& GetInstance(); |
| + |
| + virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; |
| + virtual WebViewBase* CreateWebViewBase(WebViewClient*, |
| + WebPageVisibilityState) const = 0; |
| + |
| + private: |
| + static WebFactory* factory_instance_; |
| +}; |
|
dcheng
2017/05/17 04:35:57
Nit: newline for consistency
sashab
2017/05/22 03:45:05
Done for both
|
| +} |
|
dcheng
2017/05/17 04:35:57
Nit: // namespace blink
(same below)
sashab
2017/05/22 03:45:05
Done for both
|
| + |
| +#endif |