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

Side by Side Diff: components/offline_pages/content/background_loader/background_loader_contents.h

Issue 2481443002: Implementation (cc file) for background loader contents. (Closed)
Patch Set: rebase Created 4 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
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 COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CON TENTS_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CON TENTS_H_
6 #define COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CON TENTS_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CON TENTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h"
11 #include "content/public/browser/web_contents_delegate.h" 10 #include "content/public/browser/web_contents_delegate.h"
12 #include "url/gurl.h" 11 #include "url/gurl.h"
13 12
14 namespace content { 13 namespace content {
15 class WebContents; 14 class WebContents;
15 class BrowserContext;
16 } 16 }
17 17
18 namespace background_loader { 18 namespace background_loader {
19 19
20 // This class maintains a WebContents used in the background. It can host 20 // This class maintains a WebContents used in the background. It can host
21 // a renderer but does not have any visible display. 21 // a renderer but does not have any visible display.
22 class BackgroundLoaderContents : public content::WebContentsDelegate { 22 class BackgroundLoaderContents : public content::WebContentsDelegate {
23 public: 23 public:
24 // Creates BackgroundLoaderContents with specified |browser_context|. Uses 24 // Creates BackgroundLoaderContents with specified |browser_context|. Uses
25 // default session storage space. 25 // default session storage space.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void RequestMediaAccessPermission( 68 void RequestMediaAccessPermission(
69 content::WebContents* contents, 69 content::WebContents* contents,
70 const content::MediaStreamRequest& request, 70 const content::MediaStreamRequest& request,
71 const content::MediaResponseCallback& callback) override; 71 const content::MediaResponseCallback& callback) override;
72 bool CheckMediaAccessPermission(content::WebContents* contents, 72 bool CheckMediaAccessPermission(content::WebContents* contents,
73 const GURL& security_origin, 73 const GURL& security_origin,
74 content::MediaStreamType type) override; 74 content::MediaStreamType type) override;
75 75
76 private: 76 private:
77 friend class BackgroundLoaderContentsTest;
78 BackgroundLoaderContents();
79
77 std::unique_ptr<content::WebContents> web_contents_; 80 std::unique_ptr<content::WebContents> web_contents_;
78 content::BrowserContext* browser_context_; 81 content::BrowserContext* browser_context_;
79 82
80 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderContents); 83 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderContents);
81 }; 84 };
82 85
83 } // namespace background_loader 86 } // namespace background_loader
84 #endif // COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_ CONTENTS_H_ 87 #endif // COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_ CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698