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

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

Issue 11364053: make StackingClient dispatch to either ash or desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + disable prerender tests on win-aura Created 8 years, 1 month 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
« no previous file with comments | « ash/wm/stacking_controller.cc ('k') | chrome/browser/prerender/prerender_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/prerender/prerender_manager.h" 5 #include "chrome/browser/prerender/prerender_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender( 229 PrerenderHandle* PrerenderManager::AddPrerenderFromLinkRelPrerender(
230 int process_id, 230 int process_id,
231 int route_id, 231 int route_id,
232 const GURL& url, 232 const GURL& url,
233 const content::Referrer& referrer, 233 const content::Referrer& referrer,
234 const gfx::Size& size) { 234 const gfx::Size& size) {
235 #if defined(OS_ANDROID) 235 #if defined(OS_ANDROID)
236 // TODO(jcivelli): http://crbug.com/113322 We should have an option to disable 236 // TODO(jcivelli): http://crbug.com/113322 We should have an option to disable
237 // link-prerender and enable omnibox-prerender only. 237 // link-prerender and enable omnibox-prerender only.
238 return NULL; 238 return NULL;
239 #elif defined(OS_WIN) && defined(USE_AURA)
240 // TODO(scottmg): http://crbug.com/128578 WebContentsViewAura can't get a
241 // valid parent window here.
242 return NULL;
239 #else 243 #else
240 DCHECK(!size.IsEmpty()); 244 DCHECK(!size.IsEmpty());
241 Origin origin = ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN; 245 Origin origin = ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN;
242 SessionStorageNamespace* session_storage_namespace = NULL; 246 SessionStorageNamespace* session_storage_namespace = NULL;
243 // Unit tests pass in a process_id == -1. 247 // Unit tests pass in a process_id == -1.
244 if (process_id != -1) { 248 if (process_id != -1) {
245 RenderViewHost* source_render_view_host = 249 RenderViewHost* source_render_view_host =
246 RenderViewHost::FromID(process_id, route_id); 250 RenderViewHost::FromID(process_id, route_id);
247 if (!source_render_view_host) 251 if (!source_render_view_host)
248 return NULL; 252 return NULL;
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 if (!render_process_host || !render_process_host->GetBrowserContext()) 1380 if (!render_process_host || !render_process_host->GetBrowserContext())
1377 return NULL; 1381 return NULL;
1378 Profile* profile = Profile::FromBrowserContext( 1382 Profile* profile = Profile::FromBrowserContext(
1379 render_process_host->GetBrowserContext()); 1383 render_process_host->GetBrowserContext());
1380 if (!profile) 1384 if (!profile)
1381 return NULL; 1385 return NULL;
1382 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); 1386 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile);
1383 } 1387 }
1384 1388
1385 } // namespace prerender 1389 } // namespace prerender
OLDNEW
« no previous file with comments | « ash/wm/stacking_controller.cc ('k') | chrome/browser/prerender/prerender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698