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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better message filtering approach. 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 #include "chrome/browser/prerender/prerender_contents.h" 5 #include "chrome/browser/prerender/prerender_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 const std::wstring& title) { 294 const std::wstring& title) {
295 DCHECK_EQ(render_view_host_, render_view_host); 295 DCHECK_EQ(render_view_host_, render_view_host);
296 if (title.empty()) 296 if (title.empty())
297 return; 297 return;
298 298
299 title_ = WideToUTF16Hack(title); 299 title_ = WideToUTF16Hack(title);
300 page_id_ = page_id; 300 page_id_ = page_id;
301 } 301 }
302 302
303 void PrerenderContents::RunJavaScriptMessage( 303 void PrerenderContents::RunJavaScriptMessage(
304 const RenderViewHost* rvh,
304 const std::wstring& message, 305 const std::wstring& message,
305 const std::wstring& default_prompt, 306 const std::wstring& default_prompt,
306 const GURL& frame_url, 307 const GURL& frame_url,
307 const int flags, 308 const int flags,
308 IPC::Message* reply_msg, 309 IPC::Message* reply_msg,
309 bool* did_suppress_message) { 310 bool* did_suppress_message) {
310 // Always suppress JavaScript messages if they're triggered by a page being 311 // Always suppress JavaScript messages if they're triggered by a page being
311 // prerendered. 312 // prerendered.
312 *did_suppress_message = true; 313 *did_suppress_message = true;
313 // We still want to show the user the message when they navigate to this 314 // We still want to show the user the message when they navigate to this
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 size_t private_bytes, shared_bytes; 586 size_t private_bytes, shared_bytes;
586 if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) { 587 if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) {
587 if (private_bytes > 588 if (private_bytes >
588 prerender_manager_->max_prerender_memory_mb() * 1024 * 1024) { 589 prerender_manager_->max_prerender_memory_mb() * 1024 * 1024) {
589 Destroy(FINAL_STATUS_MEMORY_LIMIT_EXCEEDED); 590 Destroy(FINAL_STATUS_MEMORY_LIMIT_EXCEEDED);
590 } 591 }
591 } 592 }
592 } 593 }
593 594
594 } // namespace prerender 595 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698