Extract code handling PrinterProviderAPI from PrintPreviewHandler
[chromium-blink-merge.git] / ios / chrome / browser / application_context.h
blobc10e8f8ea3026f9c7f9035359bab10000116e92e
1 // Copyright 2014 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_CHROME_BROWSER_APPLICATION_CONTEXT_H_
6 #define IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_
8 #include <string>
10 #include "base/macros.h"
12 namespace net {
13 class URLRequestContextGetter;
16 class ApplicationContext;
17 class PrefService;
19 // Gets the global application context. Cannot return null.
20 ApplicationContext* GetApplicationContext();
22 class ApplicationContext {
23 public:
24 ApplicationContext();
25 virtual ~ApplicationContext();
27 // Gets the local state associated with this application.
28 virtual PrefService* GetLocalState() = 0;
30 // Gets the URL request context associated with this application.
31 virtual net::URLRequestContextGetter* GetSystemURLRequestContext() = 0;
33 // Gets the locale used by the application.
34 virtual const std::string& GetApplicationLocale() = 0;
36 protected:
37 // Sets the global ApplicationContext instance.
38 static void SetApplicationContext(ApplicationContext* context);
40 private:
41 DISALLOW_COPY_AND_ASSIGN(ApplicationContext);
44 #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_