Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / ios / public / provider / chrome / browser / chrome_browser_provider.h
blob668c6223beb1145e1e9c1b9dcc9266857adbef66
1 // Copyright 2013 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.
5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_
8 class PrefService;
10 namespace net {
11 class URLRequestContextGetter;
14 namespace web {
15 class WebState;
18 // TODO(ios): Determine the best way to interface with Obj-C code through
19 // the ChromeBrowserProvider. crbug/298181
20 #ifdef __OBJC__
21 @class UIView;
22 @protocol InfoBarViewProtocol;
23 typedef UIView<InfoBarViewProtocol> InfoBarViewPlaceholder;
24 #else
25 class InfoBarViewPlaceholder;
26 class UIView;
27 #endif
29 namespace ios {
31 class ChromeBrowserProvider;
32 class GeolocationUpdaterProvider;
33 class StringProvider;
34 class UpdatableResourceProvider;
36 // Setter and getter for the provider. The provider should be set early, before
37 // any browser code is called.
38 void SetChromeBrowserProvider(ChromeBrowserProvider* provider);
39 ChromeBrowserProvider* GetChromeBrowserProvider();
41 // A class that allows embedding iOS-specific functionality in the
42 // ios_chrome_browser target.
43 class ChromeBrowserProvider {
44 public:
45 ChromeBrowserProvider();
46 virtual ~ChromeBrowserProvider();
48 // Gets the system URL request context.
49 virtual net::URLRequestContextGetter* GetSystemURLRequestContext();
50 // Gets the local state.
51 virtual PrefService* GetLocalState();
52 // Returns an UpdatableResourceProvider instance.
53 virtual UpdatableResourceProvider* GetUpdatableResourceProvider();
54 // Returns an instance of an infobar view. The caller is responsible for
55 // initializing the returned object and releasing it when appropriate.
56 virtual InfoBarViewPlaceholder* CreateInfoBarView();
57 // Returns an instance of a string provider.
58 virtual StringProvider* GetStringProvider();
59 virtual GeolocationUpdaterProvider* GetGeolocationUpdaterProvider();
60 // Displays the Translate settings screen.
61 virtual void ShowTranslateSettings();
62 // Returns the chrome UI scheme.
63 // TODO(droger): Remove this method once chrome no longer needs to match
64 // content.
65 virtual const char* GetChromeUIScheme();
66 // Sets the alpha property of an UIView with an animation.
67 virtual void SetUIViewAlphaWithAnimation(UIView* view, float alpha);
70 } // namespace ios
72 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_