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

Side by Side Diff: components/dom_distiller/core/viewer.h

Issue 235833003: Move helper utilities for the DOM Distiller Viewer to core. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed iOS grit whitelist Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h"
13
14 namespace dom_distiller {
15
16 class DistilledArticleProto;
17 class DomDistillerServiceInterface;
18 class ViewerHandle;
19 class ViewRequestDelegate;
20
21 namespace viewer {
22
23 // Returns a full HTML page based on the given |article_proto|. This is supposed
24 // to displayed to the end user. The returned HTML should be considered unsafe,
25 // so callers must ensure rendering it does not compromise Chrome.
26 const std::string GetUnsafeHtml(const DistilledArticleProto* article_proto);
27
28 // Returns a full HTML page which displays a generic error.
29 const std::string GetErrorPageHtml();
30
31 // Returns the default CSS to be used for a viewer.
32 const std::string GetCss();
33
34 // Based on the given path, calls into the DomDistillerServiceInterface for
35 // viewing distilled content based on the |path|.
36 scoped_ptr<ViewerHandle> CreateViewRequest(
37 DomDistillerServiceInterface* dom_distiller_service,
38 const std::string& path,
39 ViewRequestDelegate* view_request_delegate);
40
41 } // namespace viewer
42
43 } // namespace dom_distiller
44
45 #endif // COMPONENTS_DOM_DISTILLER_CORE_VIEWER_H_
OLDNEW
« no previous file with comments | « components/dom_distiller/content/dom_distiller_viewer_source_unittest.cc ('k') | components/dom_distiller/core/viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698