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

Side by Side Diff: content/public/browser/web_ui_data_source.h

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add TODO and merge to trunk Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 class RefCountedMemory; 14 class RefCountedMemory;
15 } 15 }
16 16
17 namespace content { 17 namespace content {
18 class BrowserContext; 18 class BrowserContext;
19 19
20 // A data source that can help with implementing the common operations needed by 20 // A data source that can help with implementing the common operations needed by
21 // WebUI pages. 21 // WebUI pages.
22 class WebUIDataSource { 22 class WebUIDataSource {
23 public: 23 public:
24 virtual ~WebUIDataSource() {} 24 virtual ~WebUIDataSource() {}
25 25
26 CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name); 26 CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name);
27 27
28 #if defined(USE_MOJO)
29 // Adds the necessary resources for mojo bindings returning the
30 // WebUIDataSource that handles the resources. Callers do not own the return
31 // value.
32 CONTENT_EXPORT static WebUIDataSource* AddMojoDataSource(
33 BrowserContext* browser_context);
34 #endif
35
28 // Adds a WebUI data source to |browser_context|. 36 // Adds a WebUI data source to |browser_context|.
29 CONTENT_EXPORT static void Add(BrowserContext* browser_context, 37 CONTENT_EXPORT static void Add(BrowserContext* browser_context,
30 WebUIDataSource* source); 38 WebUIDataSource* source);
31 39
32 // Adds a string keyed to its name to our dictionary. 40 // Adds a string keyed to its name to our dictionary.
33 virtual void AddString(const std::string& name, 41 virtual void AddString(const std::string& name,
34 const base::string16& value) = 0; 42 const base::string16& value) = 0;
35 43
36 // Adds a string keyed to its name to our dictionary. 44 // Adds a string keyed to its name to our dictionary.
37 virtual void AddString(const std::string& name, const std::string& value) = 0; 45 virtual void AddString(const std::string& name, const std::string& value) = 0;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual void OverrideContentSecurityPolicyObjectSrc( 94 virtual void OverrideContentSecurityPolicyObjectSrc(
87 const std::string& data) = 0; 95 const std::string& data) = 0;
88 virtual void OverrideContentSecurityPolicyFrameSrc( 96 virtual void OverrideContentSecurityPolicyFrameSrc(
89 const std::string& data) = 0; 97 const std::string& data) = 0;
90 virtual void DisableDenyXFrameOptions() = 0; 98 virtual void DisableDenyXFrameOptions() = 0;
91 }; 99 };
92 100
93 } // namespace content 101 } // namespace content
94 102
95 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ 103 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_view_host.h ('k') | content/renderer/mojo/mojo_render_process_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698