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

Side by Side Diff: ios/clean/chrome/browser/ui/overlay_service/overlay_service_factory.h

Issue 2921833002: [iOS Clean] Created OverlayService.
Patch Set: rebase & Mark's comments 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
OLDNEW
(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 IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_OVERLAY_SERVICE_FACTORY_H_
6 #define IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_OVERLAY_SERVICE_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
10
11 namespace base {
12 template <typename T>
13 struct DefaultSingletonTraits;
14 }
15
16 namespace ios {
17 class ChromeBrowserState;
18 }
19
20 class OverlayService;
21
22 // OverlayServiceFactory attaches OverlayServices to ChromeBrowserStates.
23 class OverlayServiceFactory : public BrowserStateKeyedServiceFactory {
24 public:
25 // Convenience getter that typecasts the value returned to OverlayService.
26 static OverlayService* GetForBrowserState(
27 ios::ChromeBrowserState* browser_state);
28 // Getter for singleton instance.
29 static OverlayServiceFactory* GetInstance();
30
31 private:
32 friend struct base::DefaultSingletonTraits<OverlayServiceFactory>;
33
34 OverlayServiceFactory();
35 ~OverlayServiceFactory() override;
36
37 // BrowserStateKeyedServiceFactory implementation.
38 std::unique_ptr<KeyedService> BuildServiceInstanceFor(
39 web::BrowserState* context) const override;
40
41 DISALLOW_COPY_AND_ASSIGN(OverlayServiceFactory);
42 };
43
44 #endif // IOS_CLEAN_CHROME_BROWSER_UI_OVERLAYS_OVERLAY_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698