Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
|
nyquist
2014/06/26 20:39:58
It seems like this file contains only stray change
smaslo
2014/06/27 18:33:17
Done.
| |
| 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_DOM_DISTILLER_VIEWER_SOURCE_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_VIEWER_SOURCE_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_VIEWER_SOURCE_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_VIEWER_SOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "components/dom_distiller/core/reader_mode_preferences.h" | |
|
nyquist
2014/06/26 20:39:58
Remove.
smaslo
2014/06/27 18:33:17
Done.
| |
| 12 #include "content/public/browser/url_data_source.h" | 13 #include "content/public/browser/url_data_source.h" |
| 13 | 14 |
| 14 namespace dom_distiller { | 15 namespace dom_distiller { |
| 15 | 16 |
| 16 class DomDistillerServiceInterface; | 17 class DomDistillerServiceInterface; |
| 17 class DomDistillerViewerSourceTest; | 18 class DomDistillerViewerSourceTest; |
| 18 class ViewerHandle; | 19 class ViewerHandle; |
| 19 class ViewRequestDelegate; | 20 class ViewRequestDelegate; |
| 20 | 21 |
| 21 // Serves HTML and resources for viewing distilled articles. | 22 // Serves HTML and resources for viewing distilled articles. |
| 22 class DomDistillerViewerSource : public content::URLDataSource { | 23 class DomDistillerViewerSource |
| 24 : public content::URLDataSource { | |
|
nyquist
2014/06/26 20:39:58
Could this be on one line?
smaslo
2014/06/27 18:33:17
Done.
| |
| 23 public: | 25 public: |
| 24 DomDistillerViewerSource(DomDistillerServiceInterface* dom_distiller_service, | 26 DomDistillerViewerSource(DomDistillerServiceInterface* dom_distiller_service, |
| 25 const std::string& scheme); | 27 const std::string& scheme); |
| 26 virtual ~DomDistillerViewerSource(); | 28 virtual ~DomDistillerViewerSource(); |
| 27 | 29 |
| 28 class RequestViewerHandle; | 30 class RequestViewerHandle; |
| 29 | 31 |
| 30 // Overridden from content::URLDataSource: | 32 // Overridden from content::URLDataSource: |
| 31 virtual std::string GetSource() const OVERRIDE; | 33 virtual std::string GetSource() const OVERRIDE; |
| 32 virtual void StartDataRequest( | 34 virtual void StartDataRequest( |
| 33 const std::string& path, | 35 const std::string& path, |
| 34 int render_process_id, | 36 int render_process_id, |
| 35 int render_frame_id, | 37 int render_frame_id, |
| 36 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 38 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
| 37 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; | 39 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; |
| 38 virtual bool ShouldServiceRequest( | 40 virtual bool ShouldServiceRequest( |
| 39 const net::URLRequest* request) const OVERRIDE; | 41 const net::URLRequest* request) const OVERRIDE; |
| 40 virtual void WillServiceRequest(const net::URLRequest* request, | 42 virtual void WillServiceRequest(const net::URLRequest* request, |
| 41 std::string* path) const OVERRIDE; | 43 std::string* path) const OVERRIDE; |
| 42 virtual std::string GetContentSecurityPolicyObjectSrc() const OVERRIDE; | 44 virtual std::string GetContentSecurityPolicyObjectSrc() const OVERRIDE; |
| 43 | 45 |
| 46 | |
|
nyquist
2014/06/26 20:39:58
Is this needed?
smaslo
2014/06/27 18:33:17
Done.
| |
| 44 private: | 47 private: |
| 45 friend class DomDistillerViewerSourceTest; | 48 friend class DomDistillerViewerSourceTest; |
| 46 | 49 |
| 47 // The scheme this URLDataSource is hosted under. | 50 // The scheme this URLDataSource is hosted under. |
| 48 std::string scheme_; | 51 std::string scheme_; |
| 49 | 52 |
| 50 // The service which contains all the functionality needed to interact with | 53 // The service which contains all the functionality needed to interact with |
| 51 // the list of articles. | 54 // the list of articles. |
| 52 DomDistillerServiceInterface* dom_distiller_service_; | 55 DomDistillerServiceInterface* dom_distiller_service_; |
| 53 | 56 |
| 54 DISALLOW_COPY_AND_ASSIGN(DomDistillerViewerSource); | 57 DISALLOW_COPY_AND_ASSIGN(DomDistillerViewerSource); |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 } // namespace dom_distiller | 60 } // namespace dom_distiller |
| 58 | 61 |
| 59 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_VIEWER_SOURCE_H_ | 62 #endif // COMPONENTS_DOM_DISTILLER_CONTENT_DOM_DISTILLER_VIEWER_SOURCE_H_ |
| OLD | NEW |