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

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

Issue 6794035: Move dispatching and sending of the last extension specific messages out of TabContents and Rende... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/background_contents_service.h" 10 #include "chrome/browser/background_contents_service.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 RendererPreferences preferences; 365 RendererPreferences preferences;
366 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile); 366 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile);
367 return preferences; 367 return preferences;
368 } 368 }
369 369
370 WebPreferences PrerenderContents::GetWebkitPrefs() { 370 WebPreferences PrerenderContents::GetWebkitPrefs() {
371 return RenderViewHostDelegateHelper::GetWebkitPrefs(profile_, 371 return RenderViewHostDelegateHelper::GetWebkitPrefs(profile_,
372 false); // is_web_ui 372 false); // is_web_ui
373 } 373 }
374 374
375 void PrerenderContents::ProcessWebUIMessage(
376 const ExtensionHostMsg_DomMessage_Params& params) {
377 render_view_host_->BlockExtensionRequest(params.request_id);
378 }
379
380 void PrerenderContents::CreateNewWindow( 375 void PrerenderContents::CreateNewWindow(
381 int route_id, 376 int route_id,
382 const ViewHostMsg_CreateWindow_Params& params) { 377 const ViewHostMsg_CreateWindow_Params& params) {
383 // Since we don't want to permit child windows that would have a 378 // Since we don't want to permit child windows that would have a
384 // window.opener property, terminate prerendering. 379 // window.opener property, terminate prerendering.
385 Destroy(FINAL_STATUS_CREATE_NEW_WINDOW); 380 Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
386 } 381 }
387 382
388 void PrerenderContents::CreateNewWidget(int route_id, 383 void PrerenderContents::CreateNewWidget(int route_id,
389 WebKit::WebPopupType popup_type) { 384 WebKit::WebPopupType popup_type) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 return; 506 return;
512 507
513 size_t private_bytes, shared_bytes; 508 size_t private_bytes, shared_bytes;
514 if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) { 509 if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) {
515 if (private_bytes > kMaxPrerenderPrivateMB * 1024 * 1024) 510 if (private_bytes > kMaxPrerenderPrivateMB * 1024 * 1024)
516 Destroy(FINAL_STATUS_MEMORY_LIMIT_EXCEEDED); 511 Destroy(FINAL_STATUS_MEMORY_LIMIT_EXCEEDED);
517 } 512 }
518 } 513 }
519 514
520 } // namespace prerender 515 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698