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 | |
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
| |
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 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.
| |
24 CORE_EXPORT static WebFactory& GetInstance(); | |
25 | |
26 virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; | |
27 virtual WebViewBase* CreateWebViewBase(WebViewClient*, | |
28 WebPageVisibilityState) const = 0; | |
29 | |
30 private: | |
31 static WebFactory* factory_instance_; | |
32 }; | |
dcheng
2017/05/17 04:35:57
Nit: newline for consistency
sashab
2017/05/22 03:45:05
Done for both
| |
33 } | |
dcheng
2017/05/17 04:35:57
Nit: // namespace blink
(same below)
sashab
2017/05/22 03:45:05
Done for both
| |
34 | |
35 #endif | |
OLD | NEW |