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

Side by Side Diff: content/public/common/content_client.h

Issue 23678008: Refactor KeySystems code to call a function to populate the info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scherkus review updates Created 7 years, 3 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) 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 CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 class TargetPolicy; 38 class TargetPolicy;
39 } 39 }
40 40
41 namespace content { 41 namespace content {
42 42
43 class ContentBrowserClient; 43 class ContentBrowserClient;
44 class ContentClient; 44 class ContentClient;
45 class ContentPluginClient; 45 class ContentPluginClient;
46 class ContentRendererClient; 46 class ContentRendererClient;
47 class ContentUtilityClient; 47 class ContentUtilityClient;
48 struct KeySystemInfo;
48 struct PepperPluginInfo; 49 struct PepperPluginInfo;
49 50
50 // Setter and getter for the client. The client should be set early, before any 51 // Setter and getter for the client. The client should be set early, before any
51 // content code is called. 52 // content code is called.
52 CONTENT_EXPORT void SetContentClient(ContentClient* client); 53 CONTENT_EXPORT void SetContentClient(ContentClient* client);
53 54
54 #if defined(CONTENT_IMPLEMENTATION) 55 #if defined(CONTENT_IMPLEMENTATION)
55 // Content's embedder API should only be used by content. 56 // Content's embedder API should only be used by content.
56 ContentClient* GetContentClient(); 57 ContentClient* GetContentClient();
57 #endif 58 #endif
(...skipping 28 matching lines...) Expand all
86 ContentRendererClient* renderer() { return renderer_; } 87 ContentRendererClient* renderer() { return renderer_; }
87 ContentUtilityClient* utility() { return utility_; } 88 ContentUtilityClient* utility() { return utility_; }
88 89
89 // Sets the currently active URL. Use GURL() to clear the URL. 90 // Sets the currently active URL. Use GURL() to clear the URL.
90 virtual void SetActiveURL(const GURL& url) {} 91 virtual void SetActiveURL(const GURL& url) {}
91 92
92 // Sets the data on the current gpu. 93 // Sets the data on the current gpu.
93 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {} 94 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) {}
94 95
95 // Gives the embedder a chance to register its own pepper plugins. 96 // Gives the embedder a chance to register its own pepper plugins.
96 virtual void AddPepperPlugins( 97 virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) {}
97 std::vector<content::PepperPluginInfo>* plugins) {}
98 98
99 // Gives the embedder a chance to register its own standard and saveable 99 // Gives the embedder a chance to register its own standard and saveable
100 // url schemes early on in the startup sequence. 100 // url schemes early on in the startup sequence.
101 virtual void AddAdditionalSchemes( 101 virtual void AddAdditionalSchemes(
102 std::vector<std::string>* standard_schemes, 102 std::vector<std::string>* standard_schemes,
103 std::vector<std::string>* savable_schemes) {} 103 std::vector<std::string>* savable_schemes) {}
104 104
105 // Gives the embedder a chance to register the key system(s) it supports.
106 virtual void AddKeySystems(std::vector<KeySystemInfo>* key_systems) {}
jam 2013/09/03 20:50:52 why is this in ContentClient? it should only be he
ddorwin 2013/09/04 00:41:55 Done.
107
105 // Returns whether the given message should be sent in a swapped out renderer. 108 // Returns whether the given message should be sent in a swapped out renderer.
106 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); 109 virtual bool CanSendWhileSwappedOut(const IPC::Message* message);
107 110
108 // Returns whether the given message should be processed in the browser on 111 // Returns whether the given message should be processed in the browser on
109 // behalf of a swapped out renderer. 112 // behalf of a swapped out renderer.
110 virtual bool CanHandleWhileSwappedOut(const IPC::Message& message); 113 virtual bool CanHandleWhileSwappedOut(const IPC::Message& message);
111 114
112 // Returns a string describing the embedder product name and version, 115 // Returns a string describing the embedder product name and version,
113 // of the form "productname/version", with no other slashes. 116 // of the form "productname/version", with no other slashes.
114 // Used as part of the user agent string. 117 // Used as part of the user agent string.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 ContentPluginClient* plugin_; 166 ContentPluginClient* plugin_;
164 // The embedder API for participating in renderer logic. 167 // The embedder API for participating in renderer logic.
165 ContentRendererClient* renderer_; 168 ContentRendererClient* renderer_;
166 // The embedder API for participating in utility logic. 169 // The embedder API for participating in utility logic.
167 ContentUtilityClient* utility_; 170 ContentUtilityClient* utility_;
168 }; 171 };
169 172
170 } // namespace content 173 } // namespace content
171 174
172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 175 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698