summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/web/browser_state.cc13
-rw-r--r--ios/web/ios_web.gyp2
-rw-r--r--ios/web/public/browser_state.h36
3 files changed, 51 insertions, 0 deletions
diff --git a/ios/web/browser_state.cc b/ios/web/browser_state.cc
new file mode 100644
index 0000000..df2499a
--- /dev/null
+++ b/ios/web/browser_state.cc
@@ -0,0 +1,13 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ios/web/public/browser_state.h"
+
+namespace web {
+BrowserState::BrowserState() {
+}
+
+BrowserState::~BrowserState() {
+}
+}
diff --git a/ios/web/ios_web.gyp b/ios/web/ios_web.gyp
index 7522981..df40501d 100644
--- a/ios/web/ios_web.gyp
+++ b/ios/web/ios_web.gyp
@@ -20,8 +20,10 @@
'../../ui/gfx/gfx.gyp:gfx',
],
'sources': [
+ 'browser_state.cc',
'navigation/navigation_item_impl.h',
'navigation/navigation_item_impl.mm',
+ 'public/browser_state.h',
'public/favicon_status.cc',
'public/favicon_status.h',
'public/navigation_item.h',
diff --git a/ios/web/public/browser_state.h b/ios/web/public/browser_state.h
new file mode 100644
index 0000000..0b68ef1
--- /dev/null
+++ b/ios/web/public/browser_state.h
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_PUBLIC_BROWSER_STATE_H_
+#define IOS_WEB_PUBLIC_BROWSER_STATE_H_
+
+#include "base/supports_user_data.h"
+
+namespace net {
+class URLRequestContextGetter;
+}
+
+namespace web {
+
+// This class holds the context needed for a browsing session.
+// It lives on the UI thread. All these methods must only be called on the UI
+// thread.
+class BrowserState : public base::SupportsUserData {
+ public:
+ virtual ~BrowserState();
+
+ // Return whether this BrowserState is incognito. Default is false.
+ virtual bool IsOffTheRecord() const = 0;
+
+ // Returns the request context information associated with this
+ // BrowserState.
+ virtual net::URLRequestContextGetter* GetRequestContext() = 0;
+
+ protected:
+ BrowserState();
+};
+
+} // namespace web
+
+#endif // IOS_WEB_PUBLIC_BROWSER_STATE_H_