OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebFactory_h | 5 #ifndef WebFactory_h |
6 #define WebFactory_h | 6 #define WebFactory_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "public/platform/WebPageVisibilityState.h" | 9 #include "public/platform/WebPageVisibilityState.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // WebFactory is a temporary class implemented in web/ that allows classes to | 23 // WebFactory is a temporary class implemented in web/ that allows classes to |
24 // construct interfaces that are being moved out of web/. | 24 // construct interfaces that are being moved out of web/. |
25 // This class will be removed once all implementations are in core/ or modules/. | 25 // This class will be removed once all implementations are in core/ or modules/. |
26 class CORE_EXPORT WebFactory { | 26 class CORE_EXPORT WebFactory { |
27 public: | 27 public: |
28 static WebFactory& GetInstance(); | 28 static WebFactory& GetInstance(); |
29 | 29 |
30 virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; | 30 virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; |
31 virtual WebViewBase* CreateWebViewBase(WebViewClient*, | 31 virtual WebViewBase* CreateWebViewBase(WebViewClient*, |
32 WebPageVisibilityState) const = 0; | 32 WebPageVisibilityState, |
| 33 WebViewBase* opener) const = 0; |
33 virtual WebLocalFrameBase* CreateWebLocalFrameBase( | 34 virtual WebLocalFrameBase* CreateWebLocalFrameBase( |
34 WebTreeScopeType, | 35 WebTreeScopeType, |
35 WebFrameClient*, | 36 WebFrameClient*, |
36 blink::InterfaceProvider*, | 37 blink::InterfaceProvider*, |
37 blink::InterfaceRegistry*, | 38 blink::InterfaceRegistry*, |
38 WebFrame* opener = nullptr) const = 0; | 39 WebFrame* opener = nullptr) const = 0; |
39 | 40 |
40 protected: | 41 protected: |
41 // Takes ownership of |factory|. | 42 // Takes ownership of |factory|. |
42 static void SetInstance(WebFactory&); | 43 static void SetInstance(WebFactory&); |
43 | 44 |
44 private: | 45 private: |
45 static WebFactory* factory_instance_; | 46 static WebFactory* factory_instance_; |
46 }; | 47 }; |
47 | 48 |
48 } // namespace blink | 49 } // namespace blink |
49 | 50 |
50 #endif | 51 #endif |
OLD | NEW |