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

Side by Side Diff: chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc

Issue 791133006: Delegates for the printing component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using initialisation parameters instead of delegate methods Created 5 years, 11 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 (c) 2014 The Chromium Authors. All rights reserved.
Lei Zhang 2015/01/06 04:11:32 It's 2015. :)
dgn 2015/01/06 16:35:31 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/printing/chrome_print_web_view_helper_delegate.h"
6
7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/render_messages.h"
10 #include "chrome/renderer/prerender/prerender_helper.h"
11 #include "content/public/renderer/render_view.h"
12 #include "ipc/ipc_message.h"
13
14
15 ChromePrintWebViewHelperDelegate::~ChromePrintWebViewHelperDelegate(){
16 }
17
18 bool ChromePrintWebViewHelperDelegate::CancelPrerender(
19 content::RenderView* render_view, int routing_id) {
20 if (!render_view || !prerender::PrerenderHelper::IsPrerendering(
21 render_view->GetMainRenderFrame()))
22 return false;
23
24 return render_view->Send(
25 new ChromeViewHostMsg_CancelPrerenderForPrinting(routing_id));
26 }
27
28 bool ChromePrintWebViewHelperDelegate::OutOfProcessPdfEnabled() const {
29 return switches::OutOfProcessPdfEnabled();
30 }
31
32 bool ChromePrintWebViewHelperDelegate::PrintPreviewDisabled() const {
33 return CommandLine::ForCurrentProcess()->HasSwitch(
34 switches::kDisablePrintPreview);
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698