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

Side by Side Diff: chrome/browser/android/offline_pages/recent_tab_helper.h

Issue 2705453003: Last_n: disable on Svelte devices. (Closed)
Patch Set: Detect low end device through delegate; add pointer to default test delegate. Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/recent_tab_helper.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ANDROID_OFFLINE_PAGES_RECENT_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_RECENT_TAB_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_RECENT_TAB_HELPER_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_RECENT_TAB_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Delegate that is used by RecentTabHelper to get external dependencies. 47 // Delegate that is used by RecentTabHelper to get external dependencies.
48 // Default implementation lives in .cc file, while tests provide an override. 48 // Default implementation lives in .cc file, while tests provide an override.
49 class Delegate { 49 class Delegate {
50 public: 50 public:
51 virtual ~Delegate() {} 51 virtual ~Delegate() {}
52 virtual std::unique_ptr<OfflinePageArchiver> CreatePageArchiver( 52 virtual std::unique_ptr<OfflinePageArchiver> CreatePageArchiver(
53 content::WebContents* web_contents) = 0; 53 content::WebContents* web_contents) = 0;
54 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0; 54 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() = 0;
55 // There is no expectations that tab_id is always present. 55 // There is no expectations that tab_id is always present.
56 virtual bool GetTabId(content::WebContents* web_contents, int* tab_id) = 0; 56 virtual bool GetTabId(content::WebContents* web_contents, int* tab_id) = 0;
57 virtual bool IsLowEndDevice() = 0;
57 }; 58 };
58 void SetDelegate(std::unique_ptr<RecentTabHelper::Delegate> delegate); 59 void SetDelegate(std::unique_ptr<RecentTabHelper::Delegate> delegate);
59 60
60 // Creates a request to download the current page with a properly filled 61 // Creates a request to download the current page with a properly filled
61 // |client_id| and valid |request_id| issued by RequestCoordinator from a 62 // |client_id| and valid |request_id| issued by RequestCoordinator from a
62 // suspended request. This method might be called multiple times for the same 63 // suspended request. This method might be called multiple times for the same
63 // page at any point after its navigation commits. There are some important 64 // page at any point after its navigation commits. There are some important
64 // points about how requests are handled: 65 // points about how requests are handled:
65 // a) While there is an ongoing request, new requests are ignored (no 66 // a) While there is an ongoing request, new requests are ignored (no
66 // overlapping snapshots). 67 // overlapping snapshots).
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 SnapshotController::PageQuality::POOR; 154 SnapshotController::PageQuality::POOR;
154 155
155 base::WeakPtrFactory<RecentTabHelper> weak_ptr_factory_; 156 base::WeakPtrFactory<RecentTabHelper> weak_ptr_factory_;
156 157
157 DISALLOW_COPY_AND_ASSIGN(RecentTabHelper); 158 DISALLOW_COPY_AND_ASSIGN(RecentTabHelper);
158 }; 159 };
159 160
160 } // namespace offline_pages 161 } // namespace offline_pages
161 162
162 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_RECENT_TAB_HELPER_H_ 163 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_RECENT_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/recent_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698