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

Side by Side Diff: chrome/browser/offline_pages/offliner_user_data.h

Issue 2857063002: Add a way to send the resource percentage signal to the RC. (Closed)
Patch Set: CR Feedback per Dimich, BMcQuade, and CSHarrison Created 3 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_
6 #define CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_
7
8 #include "components/offline_pages/core/background/offliner.h"
9 #include "content/public/browser/web_contents_user_data.h"
10
11 namespace offline_pages {
12
13 class OfflinerUserData : public content::WebContentsUserData<OfflinerUserData> {
14 public:
15 static void AddToWebContents(content::WebContents* webcontents,
16 Offliner* offliner);
17
18 static Offliner* OfflinerFromWebContents(content::WebContents* webcontents);
19
20 explicit OfflinerUserData(Offliner* offliner) { offliner_ = offliner; }
21 Offliner* offliner() { return offliner_; }
22
23 private:
24 // The offliner that the WebContents is attached to. The offliner owns the
25 // Delegate which owns the WebContents that this data is attached to.
26 // Therefore, its lifetime should exceed that of the WebContents, so this
27 // should always be non-null.
28 Offliner* offliner_;
29 };
30
31 } // namespace offline_pages
32
33 #endif // CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698