OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebFactory_h |
| 6 #define WebFactory_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "public/platform/WebPageVisibilityState.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class ChromeClient; |
| 14 class WebViewBase; |
| 15 class WebViewClient; |
| 16 |
| 17 // WebFactory is a temporary class implemented in web/ that allows classes to |
| 18 // construct interfaces that are being moved out of web/. |
| 19 // This class will be removed once all implementations are in core/ or modules/. |
| 20 class CORE_EXPORT WebFactory { |
| 21 public: |
| 22 // Takes ownership of |factory|. |
| 23 // TODO(sashab): Make this method private to WebKit.cpp. |
| 24 static void SetInstance(WebFactory&); |
| 25 static WebFactory& GetInstance(); |
| 26 |
| 27 virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; |
| 28 virtual WebViewBase* CreateWebViewBase(WebViewClient*, |
| 29 WebPageVisibilityState) const = 0; |
| 30 |
| 31 private: |
| 32 static WebFactory* factory_instance_; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif |
OLD | NEW |