Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: third_party/WebKit/Source/core/exported/WebFactory.h

Issue 2913613003: Made WebFactory::SetInstance private (Closed)
Patch Set: Moved to be protected Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFactoryImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 namespace blink { 11 namespace blink {
12 12
13 class ChromeClient; 13 class ChromeClient;
14 class WebViewBase; 14 class WebViewBase;
15 class WebViewClient; 15 class WebViewClient;
16 16
17 // WebFactory is a temporary class implemented in web/ that allows classes to 17 // WebFactory is a temporary class implemented in web/ that allows classes to
18 // construct interfaces that are being moved out of web/. 18 // construct interfaces that are being moved out of web/.
19 // This class will be removed once all implementations are in core/ or modules/. 19 // This class will be removed once all implementations are in core/ or modules/.
20 class CORE_EXPORT WebFactory { 20 class CORE_EXPORT WebFactory {
21 public: 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(); 22 static WebFactory& GetInstance();
26 23
27 virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; 24 virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0;
28 virtual WebViewBase* CreateWebViewBase(WebViewClient*, 25 virtual WebViewBase* CreateWebViewBase(WebViewClient*,
29 WebPageVisibilityState) const = 0; 26 WebPageVisibilityState) const = 0;
30 27
28 protected:
29 // Takes ownership of |factory|.
30 static void SetInstance(WebFactory&);
31
31 private: 32 private:
32 static WebFactory* factory_instance_; 33 static WebFactory* factory_instance_;
33 }; 34 };
34 35
35 } // namespace blink 36 } // namespace blink
36 37
37 #endif 38 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFactoryImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698