OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/prerender/prerender_contents.h" | 5 #include "chrome/browser/prerender/prerender_contents.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/background_contents_service.h" | 8 #include "chrome/browser/background_contents_service.h" |
9 #include "chrome/browser/browsing_instance.h" | 9 #include "chrome/browser/browsing_instance.h" |
10 #include "chrome/browser/prerender/prerender_manager.h" | 10 #include "chrome/browser/prerender/prerender_manager.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 false); // is_dom_ui | 190 false); // is_dom_ui |
191 } | 191 } |
192 | 192 |
193 void PrerenderContents::ProcessDOMUIMessage( | 193 void PrerenderContents::ProcessDOMUIMessage( |
194 const ViewHostMsg_DomMessage_Params& params) { | 194 const ViewHostMsg_DomMessage_Params& params) { |
195 render_view_host_->BlockExtensionRequest(params.request_id); | 195 render_view_host_->BlockExtensionRequest(params.request_id); |
196 } | 196 } |
197 | 197 |
198 void PrerenderContents::CreateNewWindow( | 198 void PrerenderContents::CreateNewWindow( |
199 int route_id, | 199 int route_id, |
200 WindowContainerType window_container_type, | 200 const ViewHostMsg_CreateWindow_Params& params) { |
201 const string16& frame_name) { | |
202 // Since we don't want to permit child windows that would have a | 201 // Since we don't want to permit child windows that would have a |
203 // window.opener property, terminate prerendering. | 202 // window.opener property, terminate prerendering. |
204 prerender_manager_->RemoveEntry(this); | 203 prerender_manager_->RemoveEntry(this); |
205 } | 204 } |
206 | 205 |
207 void PrerenderContents::CreateNewWidget(int route_id, | 206 void PrerenderContents::CreateNewWidget(int route_id, |
208 WebKit::WebPopupType popup_type) { | 207 WebKit::WebPopupType popup_type) { |
209 NOTREACHED(); | 208 NOTREACHED(); |
210 } | 209 } |
211 | 210 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } | 258 } |
260 | 259 |
261 void PrerenderContents::AddAliasURL(const GURL& url) { | 260 void PrerenderContents::AddAliasURL(const GURL& url) { |
262 alias_urls_.push_back(url); | 261 alias_urls_.push_back(url); |
263 } | 262 } |
264 | 263 |
265 bool PrerenderContents::MatchesURL(const GURL& url) const { | 264 bool PrerenderContents::MatchesURL(const GURL& url) const { |
266 return std::find(alias_urls_.begin(), alias_urls_.end(), url) | 265 return std::find(alias_urls_.begin(), alias_urls_.end(), url) |
267 != alias_urls_.end(); | 266 != alias_urls_.end(); |
268 } | 267 } |
OLD | NEW |