OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DOM_DISTILLER_CONTENT_BROWSER_DOM_DISTILLER_VIEWER_SOURCE_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DOM_DISTILLER_VIEWER_SOURCE_H_ |
6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DOM_DISTILLER_VIEWER_SOURCE_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DOM_DISTILLER_VIEWER_SOURCE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 class RequestViewerHandle; | 29 class RequestViewerHandle; |
30 | 30 |
31 // Overridden from content::URLDataSource: | 31 // Overridden from content::URLDataSource: |
32 std::string GetSource() const override; | 32 std::string GetSource() const override; |
33 void StartDataRequest( | 33 void StartDataRequest( |
34 const std::string& path, | 34 const std::string& path, |
35 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, | 35 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, |
36 const content::URLDataSource::GotDataCallback& callback) override; | 36 const content::URLDataSource::GotDataCallback& callback) override; |
37 std::string GetMimeType(const std::string& path) const override; | 37 std::string GetMimeType(const std::string& path) const override; |
38 bool ShouldServiceRequest(const net::URLRequest* request) const override; | 38 bool ShouldServiceRequest(const GURL& url, |
39 void WillServiceRequest(const net::URLRequest* request, | 39 content::ResourceContext* resource_context, |
40 std::string* path) const override; | 40 int render_process_id) const override; |
41 std::string GetContentSecurityPolicyStyleSrc() const override; | 41 std::string GetContentSecurityPolicyStyleSrc() const override; |
42 std::string GetContentSecurityPolicyChildSrc() const override; | 42 std::string GetContentSecurityPolicyChildSrc() const override; |
43 | 43 |
44 private: | 44 private: |
45 friend class DomDistillerViewerSourceTest; | 45 friend class DomDistillerViewerSourceTest; |
46 | 46 |
47 // The scheme this URLDataSource is hosted under. | 47 // The scheme this URLDataSource is hosted under. |
48 std::string scheme_; | 48 std::string scheme_; |
49 | 49 |
50 // The service which contains all the functionality needed to interact with | 50 // The service which contains all the functionality needed to interact with |
51 // the list of articles. | 51 // the list of articles. |
52 DomDistillerServiceInterface* dom_distiller_service_; | 52 DomDistillerServiceInterface* dom_distiller_service_; |
53 | 53 |
54 // An object for accessing chrome-specific UI controls including external | 54 // An object for accessing chrome-specific UI controls including external |
55 // feedback and opening the distiller settings. | 55 // feedback and opening the distiller settings. |
56 std::unique_ptr<DistillerUIHandle> distiller_ui_handle_; | 56 std::unique_ptr<DistillerUIHandle> distiller_ui_handle_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(DomDistillerViewerSource); | 58 DISALLOW_COPY_AND_ASSIGN(DomDistillerViewerSource); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace dom_distiller | 61 } // namespace dom_distiller |
62 | 62 |
63 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DOM_DISTILLER_VIEWER_SOURCE_
H_ | 63 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DOM_DISTILLER_VIEWER_SOURCE_
H_ |
OLD | NEW |