cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ios / chrome / browser / application_context.h
blobd8cf21db599ae20ff2196bf4b134124240d0c26c
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 ios {
13 class ChromeBrowserStateManager;
16 namespace metrics {
17 class MetricsService;
20 namespace net {
21 class URLRequestContextGetter;
24 namespace rappor {
25 class RapporService;
28 class ApplicationContext;
29 class PrefService;
31 // Gets the global application context. Cannot return null.
32 ApplicationContext* GetApplicationContext();
34 class ApplicationContext {
35 public:
36 ApplicationContext();
37 virtual ~ApplicationContext();
39 // Gets the local state associated with this application.
40 virtual PrefService* GetLocalState() = 0;
42 // Gets the URL request context associated with this application.
43 virtual net::URLRequestContextGetter* GetSystemURLRequestContext() = 0;
45 // Gets the locale used by the application.
46 virtual const std::string& GetApplicationLocale() = 0;
48 // Gets the ChromeBrowserStateManager used by this application.
49 virtual ios::ChromeBrowserStateManager* GetChromeBrowserStateManager() = 0;
51 // Gets the MetricsService used by this application.
52 virtual metrics::MetricsService* GetMetricsService() = 0;
54 // Gets the RapporService. May returns null.
55 virtual rappor::RapporService* GetRapporService() = 0;
57 protected:
58 // Sets the global ApplicationContext instance.
59 static void SetApplicationContext(ApplicationContext* context);
61 private:
62 DISALLOW_COPY_AND_ASSIGN(ApplicationContext);
65 #endif // IOS_CHROME_BROWSER_APPLICATION_CONTEXT_H_