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

Side by Side Diff: chrome/browser/renderer_host/chrome_render_message_filter.h

Issue 9875026: **NOTFORLANDING** New link rel=prerender API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wdyt? Created 8 years, 9 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 CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop_helpers.h" 14 #include "base/message_loop_helpers.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/common/content_settings.h" 16 #include "chrome/common/content_settings.h"
17 #include "content/public/browser/browser_message_filter.h" 17 #include "content/public/browser/browser_message_filter.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
19 19
20 class CookieSettings; 20 class CookieSettings;
21 struct ExtensionHostMsg_Request_Params; 21 struct ExtensionHostMsg_Request_Params;
22 class ExtensionInfoMap; 22 class ExtensionInfoMap;
23 class GURL; 23 class GURL;
24 24
25 namespace content {
26 class Referrer;
27 }
28
29 namespace gfx {
30 class Size;
31 }
32
25 namespace net { 33 namespace net {
26 class URLRequestContextGetter; 34 class URLRequestContextGetter;
27 } 35 }
28 36
29 // This class filters out incoming Chrome-specific IPC messages for the renderer 37 // This class filters out incoming Chrome-specific IPC messages for the renderer
30 // process on the IPC thread. 38 // process on the IPC thread.
31 class ChromeRenderMessageFilter : public content::BrowserMessageFilter { 39 class ChromeRenderMessageFilter : public content::BrowserMessageFilter {
32 public: 40 public:
33 ChromeRenderMessageFilter(int render_process_id, 41 ChromeRenderMessageFilter(int render_process_id,
34 Profile* profile, 42 Profile* profile,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 bool* allowed); 159 bool* allowed);
152 void OnCanTriggerClipboardRead(const GURL& origin, bool* allowed); 160 void OnCanTriggerClipboardRead(const GURL& origin, bool* allowed);
153 void OnCanTriggerClipboardWrite(const GURL& origin, bool* allowed); 161 void OnCanTriggerClipboardWrite(const GURL& origin, bool* allowed);
154 void OnGetCookies(const GURL& url, 162 void OnGetCookies(const GURL& url,
155 const GURL& first_party_for_cookies, 163 const GURL& first_party_for_cookies,
156 IPC::Message* reply_msg); 164 IPC::Message* reply_msg);
157 void OnSetCookie(const IPC::Message& message, 165 void OnSetCookie(const IPC::Message& message,
158 const GURL& url, 166 const GURL& url,
159 const GURL& first_party_for_cookies, 167 const GURL& first_party_for_cookies,
160 const std::string& cookie); 168 const std::string& cookie);
169 void OnNewLinkPrerender(int prerender_id,
170 int render_view_route_id,
171 const GURL& url,
172 const content::Referrer& referrer,
173 const gfx::Size& size);
174 void OnRemovedLinkPrerender(int prerender_id);
175 void OnUnloadedLinkPrerender(int prerender_id);
161 176
162 int render_process_id_; 177 int render_process_id_;
163 178
164 // The Profile associated with our renderer process. This should only be 179 // The Profile associated with our renderer process. This should only be
165 // accessed on the UI thread! 180 // accessed on the UI thread!
166 Profile* profile_; 181 Profile* profile_;
167 scoped_refptr<net::URLRequestContextGetter> request_context_; 182 scoped_refptr<net::URLRequestContextGetter> request_context_;
168 scoped_refptr<ExtensionInfoMap> extension_info_map_; 183 scoped_refptr<ExtensionInfoMap> extension_info_map_;
169 // Used to look up permissions at database creation time. 184 // Used to look up permissions at database creation time.
170 scoped_refptr<CookieSettings> cookie_settings_; 185 scoped_refptr<CookieSettings> cookie_settings_;
171 186
172 base::WeakPtrFactory<ChromeRenderMessageFilter> weak_ptr_factory_; 187 base::WeakPtrFactory<ChromeRenderMessageFilter> weak_ptr_factory_;
173 188
174 DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); 189 DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter);
175 }; 190 };
176 191
177 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ 192 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698