1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
// Copyright (C) 2013 Canonical Ltd.
4
// This library is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU Lesser General Public
6
// License as published by the Free Software Foundation; either
7
// version 2.1 of the License, or (at your option) any later version.
9
// This library is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// Lesser General Public License for more details.
14
// You should have received a copy of the GNU Lesser General Public
15
// License along with this library; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
#ifndef _OXIDE_SHARED_BROWSER_OFF_THE_RECORD_BROWSER_CONTEXT_IMPL_H_
19
#define _OXIDE_SHARED_BROWSER_OFF_THE_RECORD_BROWSER_CONTEXT_IMPL_H_
21
#include "oxide_browser_context.h"
23
#include "base/basictypes.h"
24
#include "base/compiler_specific.h"
28
class BrowserContextImpl;
30
class OffTheRecordBrowserContextIODataImpl FINAL :
31
public BrowserContextIOData {
33
OffTheRecordBrowserContextIODataImpl(BrowserContextIOData* original_io_data);
35
net::StaticCookiePolicy::Type GetCookiePolicy() const FINAL;
36
content::CookieStoreConfig::SessionCookieMode GetSessionCookieMode() const FINAL;
38
bool IsPopupBlockerEnabled() const FINAL;
40
base::FilePath GetPath() const FINAL;
41
base::FilePath GetCachePath() const FINAL;
43
std::string GetAcceptLangs() const FINAL;
45
std::string GetUserAgent() const FINAL;
47
bool IsOffTheRecord() const FINAL;
50
BrowserContextIOData* original_io_data_;
52
DISALLOW_IMPLICIT_CONSTRUCTORS(OffTheRecordBrowserContextIODataImpl);
55
class OffTheRecordBrowserContextImpl FINAL : public BrowserContext {
57
BrowserContext* GetOffTheRecordContext() FINAL;
58
BrowserContext* GetOriginalContext() FINAL;
60
void SetAcceptLangs(const std::string& langs) FINAL;
62
std::string GetProduct() const FINAL;
63
void SetProduct(const std::string& product) FINAL;
65
void SetUserAgent(const std::string& user_agent) FINAL;
66
void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL;
67
void SetIsPopupBlockerEnabled(bool enabled) FINAL;
69
bool GetDevtoolsEnabled() const FINAL;
70
int GetDevtoolsPort() const FINAL;
71
std::string GetDevtoolsBindIp() const FINAL;
73
UserScriptMaster& UserScriptManager() FINAL;
76
friend class BrowserContext;
77
friend class BrowserContextImpl;
79
OffTheRecordBrowserContextImpl(BrowserContextImpl* original_context);
81
BrowserContextImpl* original_context_;
83
DISALLOW_COPY_AND_ASSIGN(OffTheRecordBrowserContextImpl);
88
#endif // _OXIDE_SHARED_BROWSER_OFF_THE_RECORD_BROWSER_CONTEXT_IMPL_H_