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

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

Issue 6995013: More progress towards removing content settings code from the content layer. We can't use Cookie... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and sync Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "content/common/content_client.h" 11 #include "content/common/content_client.h"
12 12
13 class BrowserRenderProcessHost; 13 class BrowserRenderProcessHost;
14 class CommandLine; 14 class CommandLine;
15 class GURL; 15 class GURL;
16 class Profile; 16 class Profile;
17 class RenderViewHost; 17 class RenderViewHost;
18 class TabContents; 18 class TabContents;
19 class WorkerProcessHost; 19 class WorkerProcessHost;
20 20
21 namespace net {
22 class CookieList;
23 class CookieOptions;
24 }
25
21 namespace content { 26 namespace content {
22 27
23 class ResourceContext; 28 class ResourceContext;
24 class WebUIFactory; 29 class WebUIFactory;
25 30
26 // Embedder API for participating in browser logic. 31 // Embedder API for participating in browser logic.
27 class ContentBrowserClient { 32 class ContentBrowserClient {
28 public: 33 public:
29 // Notifies that a new RenderHostView has been created. 34 // Notifies that a new RenderHostView has been created.
30 virtual void RenderViewHostCreated(RenderViewHost* render_view_host); 35 virtual void RenderViewHostCreated(RenderViewHost* render_view_host);
(...skipping 27 matching lines...) Expand all
58 // switches::kProcessType will already be set at this point. 63 // switches::kProcessType will already be set at this point.
59 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, 64 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
60 int child_process_id); 65 int child_process_id);
61 66
62 // Returns the locale used by the application. 67 // Returns the locale used by the application.
63 virtual std::string GetApplicationLocale(); 68 virtual std::string GetApplicationLocale();
64 69
65 // Allow the embedder to control if an AppCache can be used for the given url. 70 // Allow the embedder to control if an AppCache can be used for the given url.
66 // This is called on the IO thread. 71 // This is called on the IO thread.
67 virtual bool AllowAppCache(const GURL& manifest_url, 72 virtual bool AllowAppCache(const GURL& manifest_url,
68 const content::ResourceContext* context); 73 const content::ResourceContext& context);
74
75 // Allow the embedder to control if the given cookie can be read.
76 // This is called on the IO thread.
77 virtual bool AllowGetCookie(const GURL& url,
78 const GURL& first_party,
79 const net::CookieList& cookie_list,
80 const content::ResourceContext& context,
81 int render_process_id,
82 int render_view_id);
83
84 // Allow the embedder to control if the given cookie can be set.
85 // This is called on the IO thread.
86 virtual bool AllowSetCookie(const GURL& url,
87 const GURL& first_party,
88 const std::string& cookie_line,
89 const content::ResourceContext& context,
90 int render_process_id,
91 int render_view_id,
92 net::CookieOptions* options);
69 93
70 #if defined(OS_LINUX) 94 #if defined(OS_LINUX)
71 // Can return an optional fd for crash handling, otherwise returns -1. 95 // Can return an optional fd for crash handling, otherwise returns -1.
72 virtual int GetCrashSignalFD(const std::string& process_type); 96 virtual int GetCrashSignalFD(const std::string& process_type);
73 #endif 97 #endif
74 }; 98 };
75 99
76 } // namespace content 100 } // namespace content
77 101
78 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ 102 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/chrome_appcache_service.cc ('k') | content/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698