~osomon/oxide/ensure-files-exist

« back to all changes in this revision

Viewing changes to shared/browser/oxide_off_the_record_browser_context_impl.h

  • Committer: Olivier Tilloy
  • Date: 2014-09-25 16:27:09 UTC
  • mfrom: (677.1.95 oxide)
  • Revision ID: olivier.tilloy@canonical.com-20140925162709-h8bai0f1nfaf7cfy
Merge the latest changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// vim:expandtab:shiftwidth=2:tabstop=2:
2
 
// Copyright (C) 2013 Canonical Ltd.
3
 
 
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.
8
 
 
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.
13
 
 
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
17
 
 
18
 
#ifndef _OXIDE_SHARED_BROWSER_OFF_THE_RECORD_BROWSER_CONTEXT_IMPL_H_
19
 
#define _OXIDE_SHARED_BROWSER_OFF_THE_RECORD_BROWSER_CONTEXT_IMPL_H_
20
 
 
21
 
#include "oxide_browser_context.h"
22
 
 
23
 
#include "base/basictypes.h"
24
 
#include "base/compiler_specific.h"
25
 
 
26
 
namespace oxide {
27
 
 
28
 
class BrowserContextImpl;
29
 
 
30
 
class OffTheRecordBrowserContextIODataImpl FINAL :
31
 
    public BrowserContextIOData {
32
 
 public:
33
 
  OffTheRecordBrowserContextIODataImpl(BrowserContextIOData* original_io_data);
34
 
 
35
 
  net::StaticCookiePolicy::Type GetCookiePolicy() const FINAL;
36
 
  content::CookieStoreConfig::SessionCookieMode GetSessionCookieMode() const FINAL;
37
 
 
38
 
  bool IsPopupBlockerEnabled() const FINAL;
39
 
 
40
 
  base::FilePath GetPath() const FINAL;
41
 
  base::FilePath GetCachePath() const FINAL;
42
 
 
43
 
  std::string GetAcceptLangs() const FINAL;
44
 
 
45
 
  std::string GetUserAgent() const FINAL;
46
 
 
47
 
  bool IsOffTheRecord() const FINAL;
48
 
 
49
 
 private:
50
 
  BrowserContextIOData* original_io_data_;
51
 
 
52
 
  DISALLOW_IMPLICIT_CONSTRUCTORS(OffTheRecordBrowserContextIODataImpl);
53
 
};
54
 
 
55
 
class OffTheRecordBrowserContextImpl FINAL : public BrowserContext {
56
 
 public:
57
 
  BrowserContext* GetOffTheRecordContext() FINAL;
58
 
  BrowserContext* GetOriginalContext() FINAL;
59
 
 
60
 
  void SetAcceptLangs(const std::string& langs) FINAL;
61
 
 
62
 
  std::string GetProduct() const FINAL;
63
 
  void SetProduct(const std::string& product) FINAL;
64
 
 
65
 
  void SetUserAgent(const std::string& user_agent) FINAL;
66
 
  void SetCookiePolicy(net::StaticCookiePolicy::Type policy) FINAL;
67
 
  void SetIsPopupBlockerEnabled(bool enabled) FINAL;
68
 
 
69
 
  bool GetDevtoolsEnabled() const FINAL;
70
 
  int GetDevtoolsPort() const FINAL;
71
 
 
72
 
  UserScriptMaster& UserScriptManager() FINAL;
73
 
 
74
 
 private:
75
 
  friend class BrowserContext;
76
 
  friend class BrowserContextImpl;
77
 
 
78
 
  OffTheRecordBrowserContextImpl(BrowserContextImpl* original_context);
79
 
 
80
 
  BrowserContextImpl* original_context_;
81
 
 
82
 
  DISALLOW_COPY_AND_ASSIGN(OffTheRecordBrowserContextImpl); 
83
 
};
84
 
 
85
 
} // namespace oxide
86
 
 
87
 
#endif // _OXIDE_SHARED_BROWSER_OFF_THE_RECORD_BROWSER_CONTEXT_IMPL_H_