Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: content/shell/renderer/test_runner/WebPermissions.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef WebPermissions_h
6 #define WebPermissions_h
7
8 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
9 #include "third_party/WebKit/public/web/WebPermissionClient.h"
10
11 namespace WebTestRunner {
12
13 class WebTestDelegate;
14
15 class WebPermissions : public blink::WebPermissionClient, public blink::WebNonCo pyable {
16 public:
17 WebPermissions();
18 virtual ~WebPermissions();
19
20 // Override WebPermissionClient methods.
21 virtual bool allowImage(blink::WebFrame*, bool enabledPerSettings, const bli nk::WebURL& imageURL);
22 virtual bool allowScriptFromSource(blink::WebFrame*, bool enabledPerSettings , const blink::WebURL& scriptURL);
23 virtual bool allowStorage(blink::WebFrame*, bool local);
24 virtual bool allowPlugins(blink::WebFrame*, bool enabledPerSettings);
25 virtual bool allowDisplayingInsecureContent(blink::WebFrame*, bool enabledPe rSettings, const blink::WebSecurityOrigin&, const blink::WebURL&);
26 virtual bool allowRunningInsecureContent(blink::WebFrame*, bool enabledPerSe ttings, const blink::WebSecurityOrigin&, const blink::WebURL&);
27
28 // Hooks to set the different policies.
29 void setImagesAllowed(bool);
30 void setScriptsAllowed(bool);
31 void setStorageAllowed(bool);
32 void setPluginsAllowed(bool);
33 void setDisplayingInsecureContentAllowed(bool);
34 void setRunningInsecureContentAllowed(bool);
35
36 // Resets the policy to allow everything, except for running insecure conten t.
37 void reset();
38
39 void setDelegate(WebTestDelegate*);
40 void setDumpCallbacks(bool);
41
42 private:
43 WebTestDelegate* m_delegate;
44 bool m_dumpCallbacks;
45
46 bool m_imagesAllowed;
47 bool m_scriptsAllowed;
48 bool m_storageAllowed;
49 bool m_pluginsAllowed;
50 bool m_displayingInsecureContentAllowed;
51 bool m_runningInsecureContentAllowed;
52 };
53
54 }
55
56 #endif
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/WebFrameTestProxy.h ('k') | content/shell/renderer/test_runner/WebPermissions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698