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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_distiller.h

Issue 2108833002: Remove Simplify Page option from Print Preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark histogram entries as unused Created 4 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2015 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 CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_DISTILLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_DISTILLER_H_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "base/feature_list.h"
12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/values.h"
15 #include "content/public/browser/web_contents_observer.h"
16
17 namespace net {
18 class URLRequestContextGetter;
19 }
20
21 // This class controls the rendering of the distilled contents
22 // generated by a source web contents
23 class PrintPreviewDistiller {
24 public:
25 static const base::Feature kFeature;
26
27 static bool IsEnabled();
28
29 PrintPreviewDistiller(content::WebContents* source_web_contents,
30 base::Closure on_failed_callback,
31 std::unique_ptr<base::DictionaryValue> settings);
32 ~PrintPreviewDistiller();
33
34 private:
35 class WebContentsDelegateImpl;
36
37 // Create the web contents with a default
38 // size. |session_storage_namespace| indicates the namespace that
39 // the distiller content renderer's page should be part of.
40 void CreateDestinationWebContents(
41 content::SessionStorageNamespace* session_storage_namespace,
42 content::WebContents* source_web_contents,
43 std::unique_ptr<base::DictionaryValue> settings,
44 base::Closure on_failed_callback);
45
46 content::WebContents* CreateWebContents(
47 content::SessionStorageNamespace* session_storage_namespace,
48 content::WebContents* source_web_contents);
49
50 // The distilled rendered WebContents; may be null.
51 std::unique_ptr<content::WebContents> web_contents_;
52
53 std::unique_ptr<WebContentsDelegateImpl> web_contents_delegate_;
54
55 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDistiller);
56 };
57
58 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_DISTILLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_distiller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698