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

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

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 | « content/public/browser/browser_context.h ('k') | content/public/browser/plugin_data_remover.h » ('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 CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 virtual std::string GetAcceptLangs( 149 virtual std::string GetAcceptLangs(
150 content::BrowserContext* context) = 0; 150 content::BrowserContext* context) = 0;
151 151
152 // Returns the default favicon. The callee doesn't own the given bitmap. 152 // Returns the default favicon. The callee doesn't own the given bitmap.
153 virtual SkBitmap* GetDefaultFavicon() = 0; 153 virtual SkBitmap* GetDefaultFavicon() = 0;
154 154
155 // Allow the embedder to control if an AppCache can be used for the given url. 155 // Allow the embedder to control if an AppCache can be used for the given url.
156 // This is called on the IO thread. 156 // This is called on the IO thread.
157 virtual bool AllowAppCache(const GURL& manifest_url, 157 virtual bool AllowAppCache(const GURL& manifest_url,
158 const GURL& first_party, 158 const GURL& first_party,
159 const content::ResourceContext& context) = 0; 159 content::ResourceContext* context) = 0;
160 160
161 // Allow the embedder to control if the given cookie can be read. 161 // Allow the embedder to control if the given cookie can be read.
162 // This is called on the IO thread. 162 // This is called on the IO thread.
163 virtual bool AllowGetCookie(const GURL& url, 163 virtual bool AllowGetCookie(const GURL& url,
164 const GURL& first_party, 164 const GURL& first_party,
165 const net::CookieList& cookie_list, 165 const net::CookieList& cookie_list,
166 const content::ResourceContext& context, 166 content::ResourceContext* context,
167 int render_process_id, 167 int render_process_id,
168 int render_view_id) = 0; 168 int render_view_id) = 0;
169 169
170 // Allow the embedder to control if the given cookie can be set. 170 // Allow the embedder to control if the given cookie can be set.
171 // This is called on the IO thread. 171 // This is called on the IO thread.
172 virtual bool AllowSetCookie(const GURL& url, 172 virtual bool AllowSetCookie(const GURL& url,
173 const GURL& first_party, 173 const GURL& first_party,
174 const std::string& cookie_line, 174 const std::string& cookie_line,
175 const content::ResourceContext& context, 175 content::ResourceContext* context,
176 int render_process_id, 176 int render_process_id,
177 int render_view_id, 177 int render_view_id,
178 net::CookieOptions* options) = 0; 178 net::CookieOptions* options) = 0;
179 179
180 // This is called on the IO thread. 180 // This is called on the IO thread.
181 virtual bool AllowSaveLocalState( 181 virtual bool AllowSaveLocalState(content::ResourceContext* context) = 0;
182 const content::ResourceContext& context) = 0;
183 182
184 // Allow the embedder to control if access to web database by a shared worker 183 // Allow the embedder to control if access to web database by a shared worker
185 // is allowed. |render_views| is a vector of pairs of 184 // is allowed. |render_views| is a vector of pairs of
186 // RenderProcessID/RenderViewID of RenderViews that are using this worker. 185 // RenderProcessID/RenderViewID of RenderViews that are using this worker.
187 // This is called on the IO thread. 186 // This is called on the IO thread.
188 virtual bool AllowWorkerDatabase( 187 virtual bool AllowWorkerDatabase(
189 const GURL& url, 188 const GURL& url,
190 const string16& name, 189 const string16& name,
191 const string16& display_name, 190 const string16& display_name,
192 unsigned long estimated_size, 191 unsigned long estimated_size,
193 const content::ResourceContext& context, 192 content::ResourceContext* context,
194 const std::vector<std::pair<int, int> >& render_views) = 0; 193 const std::vector<std::pair<int, int> >& render_views) = 0;
195 194
196 // Allow the embedder to control if access to file system by a shared worker 195 // Allow the embedder to control if access to file system by a shared worker
197 // is allowed. 196 // is allowed.
198 // This is called on the IO thread. 197 // This is called on the IO thread.
199 virtual bool AllowWorkerFileSystem( 198 virtual bool AllowWorkerFileSystem(
200 const GURL& url, 199 const GURL& url,
201 const content::ResourceContext& context, 200 content::ResourceContext* context,
202 const std::vector<std::pair<int, int> >& render_views) = 0; 201 const std::vector<std::pair<int, int> >& render_views) = 0;
203 202
204 // Allows the embedder to override the request context based on the URL for 203 // Allows the embedder to override the request context based on the URL for
205 // certain operations, like cookie access. Returns NULL to indicate the 204 // certain operations, like cookie access. Returns NULL to indicate the
206 // regular request context should be used. 205 // regular request context should be used.
207 // This is called on the IO thread. 206 // This is called on the IO thread.
208 virtual net::URLRequestContext* OverrideRequestContextForURL( 207 virtual net::URLRequestContext* OverrideRequestContextForURL(
209 const GURL& url, const content::ResourceContext& context) = 0; 208 const GURL& url, content::ResourceContext* context) = 0;
210 209
211 // Create and return a new quota permission context. 210 // Create and return a new quota permission context.
212 virtual QuotaPermissionContext* CreateQuotaPermissionContext() = 0; 211 virtual QuotaPermissionContext* CreateQuotaPermissionContext() = 0;
213 212
214 // Open the given file in the desktop's default manner. 213 // Open the given file in the desktop's default manner.
215 virtual void OpenItem(const FilePath& path) = 0; 214 virtual void OpenItem(const FilePath& path) = 0;
216 215
217 // Show the given file in a file manager. If possible, select the file. 216 // Show the given file in a file manager. If possible, select the file.
218 virtual void ShowItemInFolder(const FilePath& path) = 0; 217 virtual void ShowItemInFolder(const FilePath& path) = 0;
219 218
(...skipping 28 matching lines...) Expand all
248 const GURL& source_origin, 247 const GURL& source_origin,
249 int callback_context, 248 int callback_context,
250 int render_process_id, 249 int render_process_id,
251 int render_view_id) = 0; 250 int render_view_id) = 0;
252 251
253 // Checks if the given page has permission to show desktop notifications. 252 // Checks if the given page has permission to show desktop notifications.
254 // This is called on the IO thread. 253 // This is called on the IO thread.
255 virtual WebKit::WebNotificationPresenter::Permission 254 virtual WebKit::WebNotificationPresenter::Permission
256 CheckDesktopNotificationPermission( 255 CheckDesktopNotificationPermission(
257 const GURL& source_url, 256 const GURL& source_url,
258 const content::ResourceContext& context, 257 content::ResourceContext* context,
259 int render_process_id) = 0; 258 int render_process_id) = 0;
260 259
261 // Show a desktop notification. If |worker| is true, the request came from an 260 // Show a desktop notification. If |worker| is true, the request came from an
262 // HTML5 web worker, otherwise, it came from a renderer. 261 // HTML5 web worker, otherwise, it came from a renderer.
263 virtual void ShowDesktopNotification( 262 virtual void ShowDesktopNotification(
264 const content::ShowDesktopNotificationHostMsgParams& params, 263 const content::ShowDesktopNotificationHostMsgParams& params,
265 int render_process_id, 264 int render_process_id,
266 int render_view_id, 265 int render_view_id,
267 bool worker) = 0; 266 bool worker) = 0;
268 267
269 // Cancels a displayed desktop notification. 268 // Cancels a displayed desktop notification.
270 virtual void CancelDesktopNotification( 269 virtual void CancelDesktopNotification(
271 int render_process_id, 270 int render_process_id,
272 int render_view_id, 271 int render_view_id,
273 int notification_id) = 0; 272 int notification_id) = 0;
274 273
275 // Returns true if the given page is allowed to open a window of the given 274 // Returns true if the given page is allowed to open a window of the given
276 // type. 275 // type.
277 // This is called on the IO thread. 276 // This is called on the IO thread.
278 virtual bool CanCreateWindow( 277 virtual bool CanCreateWindow(
279 const GURL& source_origin, 278 const GURL& source_origin,
280 WindowContainerType container_type, 279 WindowContainerType container_type,
281 const content::ResourceContext& context, 280 content::ResourceContext* context,
282 int render_process_id) = 0; 281 int render_process_id) = 0;
283 282
284 // Returns a title string to use in the task manager for a process host with 283 // Returns a title string to use in the task manager for a process host with
285 // the given URL, or the empty string to fall back to the default logic. 284 // the given URL, or the empty string to fall back to the default logic.
286 // This is called on the IO thread. 285 // This is called on the IO thread.
287 virtual std::string GetWorkerProcessTitle( 286 virtual std::string GetWorkerProcessTitle(
288 const GURL& url, const content::ResourceContext& context) = 0; 287 const GURL& url, content::ResourceContext* context) = 0;
289 288
290 // Notifies the embedder that the ResourceDispatcherHost has been created. 289 // Notifies the embedder that the ResourceDispatcherHost has been created.
291 // This is when it can optionally add a delegate or ResourceQueueDelegates. 290 // This is when it can optionally add a delegate or ResourceQueueDelegates.
292 virtual void ResourceDispatcherHostCreated() = 0; 291 virtual void ResourceDispatcherHostCreated() = 0;
293 292
294 // Getters for common objects. 293 // Getters for common objects.
295 virtual ui::Clipboard* GetClipboard() = 0; 294 virtual ui::Clipboard* GetClipboard() = 0;
296 virtual MHTMLGenerationManager* GetMHTMLGenerationManager() = 0; 295 virtual MHTMLGenerationManager* GetMHTMLGenerationManager() = 0;
297 virtual net::NetLog* GetNetLog() = 0; 296 virtual net::NetLog* GetNetLog() = 0;
298 virtual speech_input::SpeechInputManager* GetSpeechInputManager() = 0; 297 virtual speech_input::SpeechInputManager* GetSpeechInputManager() = 0;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // This is called on a worker thread. 350 // This is called on a worker thread.
352 virtual 351 virtual
353 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( 352 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
354 const GURL& url) = 0; 353 const GURL& url) = 0;
355 #endif 354 #endif
356 }; 355 };
357 356
358 } // namespace content 357 } // namespace content
359 358
360 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 359 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/plugin_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698