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

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

Issue 2197663002: Prerender: Allow on low end devices for ORIGIN_OFFLINE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 4 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
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_PRERENDER_PRERENDER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 DISALLOW_COPY_AND_ASSIGN(PrerenderData); 377 DISALLOW_COPY_AND_ASSIGN(PrerenderData);
378 }; 378 };
379 379
380 // Called by a PrerenderData to signal that the launcher has navigated away 380 // Called by a PrerenderData to signal that the launcher has navigated away
381 // from the context that launched the prerender. A user may have clicked 381 // from the context that launched the prerender. A user may have clicked
382 // a link in a page containing a <link rel=prerender> element, or the user 382 // a link in a page containing a <link rel=prerender> element, or the user
383 // might have committed an omnibox navigation. This is used to possibly 383 // might have committed an omnibox navigation. This is used to possibly
384 // shorten the TTL of the prerendered page. 384 // shorten the TTL of the prerendered page.
385 void SourceNavigatedAway(PrerenderData* prerender_data); 385 void SourceNavigatedAway(PrerenderData* prerender_data);
386 386
387 // Same as base::SysInfo::IsLowEndDevice(), overridden in tests.
388 virtual bool IsLowEndDevice();
mmenke 2016/08/03 15:10:58 const?
pasko 2016/08/03 15:30:17 Oops, sure. Done.
389
387 private: 390 private:
388 friend class PrerenderBrowserTest; 391 friend class PrerenderBrowserTest;
389 friend class PrerenderContents; 392 friend class PrerenderContents;
390 friend class PrerenderHandle; 393 friend class PrerenderHandle;
391 friend class UnitTestPrerenderManager; 394 friend class UnitTestPrerenderManager;
392 395
393 class OnCloseWebContentsDeleter; 396 class OnCloseWebContentsDeleter;
394 struct NavigationRecord; 397 struct NavigationRecord;
395 using PrerenderDataVector = std::vector<std::unique_ptr<PrerenderData>>; 398 using PrerenderDataVector = std::vector<std::unique_ptr<PrerenderData>>;
396 399
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Set of process hosts being prerendered. 560 // Set of process hosts being prerendered.
558 using PrerenderProcessSet = std::set<content::RenderProcessHost*>; 561 using PrerenderProcessSet = std::set<content::RenderProcessHost*>;
559 PrerenderProcessSet prerender_process_hosts_; 562 PrerenderProcessSet prerender_process_hosts_;
560 563
561 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 564 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
562 }; 565 };
563 566
564 } // namespace prerender 567 } // namespace prerender
565 568
566 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 569 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | chrome/browser/prerender/prerender_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698