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

Side by Side Diff: chrome/browser/notifications/balloon_host.h

Issue 10080018: Don't allow sending data URLs to WebUI, unless in a ChromeOS BalloonHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile errors and crash in tests. Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const string16& GetSource() const; 43 const string16& GetSource() const;
44 44
45 content::WebContents* web_contents() const { return web_contents_.get(); } 45 content::WebContents* web_contents() const { return web_contents_.get(); }
46 46
47 // Enable Web UI. This has to be called before renderer is created. 47 // Enable Web UI. This has to be called before renderer is created.
48 void EnableWebUI(); 48 void EnableWebUI();
49 49
50 // Returns whether the associated render view is ready. Used only for testing. 50 // Returns whether the associated render view is ready. Used only for testing.
51 bool IsRenderViewReady() const; 51 bool IsRenderViewReady() const;
52 52
53 // content::WebContentsDelegate implementation:
54 virtual bool CanLoadDataURLsInWebUI() const OVERRIDE;
55
53 protected: 56 protected:
54 virtual ~BalloonHost(); 57 virtual ~BalloonHost();
55 58
56 scoped_ptr<content::WebContents> web_contents_; 59 scoped_ptr<content::WebContents> web_contents_;
57 60
58 private: 61 private:
59 // content::WebContentsDelegate implementation: 62 // content::WebContentsDelegate implementation:
60 virtual void CloseContents(content::WebContents* source) OVERRIDE; 63 virtual void CloseContents(content::WebContents* source) OVERRIDE;
61 virtual void HandleMouseDown() OVERRIDE; 64 virtual void HandleMouseDown() OVERRIDE;
62 virtual void ResizeDueToAutoResize(content::WebContents* source, 65 virtual void ResizeDueToAutoResize(content::WebContents* source,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Site instance for the balloon/profile, to be used for opening new links. 98 // Site instance for the balloon/profile, to be used for opening new links.
96 scoped_refptr<content::SiteInstance> site_instance_; 99 scoped_refptr<content::SiteInstance> site_instance_;
97 100
98 // A flag to enable Web UI. 101 // A flag to enable Web UI.
99 bool enable_web_ui_; 102 bool enable_web_ui_;
100 103
101 ExtensionFunctionDispatcher extension_function_dispatcher_; 104 ExtensionFunctionDispatcher extension_function_dispatcher_;
102 }; 105 };
103 106
104 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ 107 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698