| 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 #include "components/dom_distiller/content/browser/dom_distiller_viewer_source.h
" | 5 #include "components/dom_distiller/content/browser/dom_distiller_viewer_source.h
" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "components/dom_distiller/core/url_utils.h" | 28 #include "components/dom_distiller/core/url_utils.h" |
| 29 #include "components/dom_distiller/core/viewer.h" | 29 #include "components/dom_distiller/core/viewer.h" |
| 30 #include "content/public/browser/navigation_details.h" | 30 #include "content/public/browser/navigation_details.h" |
| 31 #include "content/public/browser/navigation_entry.h" | 31 #include "content/public/browser/navigation_entry.h" |
| 32 #include "content/public/browser/render_frame_host.h" | 32 #include "content/public/browser/render_frame_host.h" |
| 33 #include "content/public/browser/render_view_host.h" | 33 #include "content/public/browser/render_view_host.h" |
| 34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "content/public/browser/web_contents_observer.h" | 35 #include "content/public/browser/web_contents_observer.h" |
| 36 #include "content/public/common/service_registry.h" | 36 #include "content/public/common/service_registry.h" |
| 37 #include "grit/components_strings.h" | 37 #include "grit/components_strings.h" |
| 38 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 38 #include "net/base/url_util.h" | 39 #include "net/base/url_util.h" |
| 39 #include "net/url_request/url_request.h" | 40 #include "net/url_request/url_request.h" |
| 40 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | |
| 41 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
| 42 | 42 |
| 43 namespace dom_distiller { | 43 namespace dom_distiller { |
| 44 | 44 |
| 45 // Handles receiving data asynchronously for a specific entry, and passing | 45 // Handles receiving data asynchronously for a specific entry, and passing |
| 46 // it along to the data callback for the data source. Lifetime matches that of | 46 // it along to the data callback for the data source. Lifetime matches that of |
| 47 // the current main frame's page in the Viewer instance. | 47 // the current main frame's page in the Viewer instance. |
| 48 class DomDistillerViewerSource::RequestViewerHandle | 48 class DomDistillerViewerSource::RequestViewerHandle |
| 49 : public DomDistillerRequestViewBase, | 49 : public DomDistillerRequestViewBase, |
| 50 public content::WebContentsObserver { | 50 public content::WebContentsObserver { |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 std::string DomDistillerViewerSource::GetContentSecurityPolicyObjectSrc() | 277 std::string DomDistillerViewerSource::GetContentSecurityPolicyObjectSrc() |
| 278 const { | 278 const { |
| 279 return "object-src 'none'; style-src 'self' https://fonts.googleapis.com;"; | 279 return "object-src 'none'; style-src 'self' https://fonts.googleapis.com;"; |
| 280 } | 280 } |
| 281 | 281 |
| 282 std::string DomDistillerViewerSource::GetContentSecurityPolicyFrameSrc() const { | 282 std::string DomDistillerViewerSource::GetContentSecurityPolicyFrameSrc() const { |
| 283 return "frame-src *;"; | 283 return "frame-src *;"; |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace dom_distiller | 286 } // namespace dom_distiller |
| OLD | NEW |