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

Side by Side Diff: printing/printing_context_cairo.cc

Issue 6533006: Print Preview: Hook up the print button to initiate printing without displaying a print dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: '' Created 9 years, 10 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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "printing/printing_context_cairo.h" 5 #include "printing/printing_context_cairo.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gtk/gtkprintunixdialog.h> 8 #include <gtk/gtkprintunixdialog.h>
9 #include <unicode/ulocdata.h> 9 #include <unicode/ulocdata.h>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/values.h"
12 #include "printing/native_metafile.h" 13 #include "printing/native_metafile.h"
13 #include "printing/print_settings_initializer_gtk.h" 14 #include "printing/print_settings_initializer_gtk.h"
14 #include "printing/units.h" 15 #include "printing/units.h"
15 16
16 namespace printing { 17 namespace printing {
17 18
18 // static 19 // static
19 PrintingContext* PrintingContext::Create(const std::string& app_locale) { 20 PrintingContext* PrintingContext::Create(const std::string& app_locale) {
20 return static_cast<PrintingContext*>(new PrintingContextCairo(app_locale)); 21 return static_cast<PrintingContext*>(new PrintingContextCairo(app_locale));
21 } 22 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 settings, page_setup, ranges_vector, false, &settings_); 94 settings, page_setup, ranges_vector, false, &settings_);
94 95
95 g_object_unref(settings); 96 g_object_unref(settings);
96 // |page_setup| is owned by dialog, so it does not need to be unref'ed. 97 // |page_setup| is owned by dialog, so it does not need to be unref'ed.
97 gtk_widget_destroy(dialog); 98 gtk_widget_destroy(dialog);
98 #endif // defined(OS_CHROMEOS) 99 #endif // defined(OS_CHROMEOS)
99 100
100 return OK; 101 return OK;
101 } 102 }
102 103
104 PrintingContext::Result PrintingContextCairo::UpdatePrintSettings(
105 const DictionaryValue* job_settings, const PageRanges& ranges) {
106 DCHECK(!in_print_job_);
107
108 settings_.ranges = ranges;
109
110 NOTIMPLEMENTED();
111
112 return FAILED;
113 }
114
115
103 PrintingContext::Result PrintingContextCairo::InitWithSettings( 116 PrintingContext::Result PrintingContextCairo::InitWithSettings(
104 const PrintSettings& settings) { 117 const PrintSettings& settings) {
105 DCHECK(!in_print_job_); 118 DCHECK(!in_print_job_);
106 119
107 settings_ = settings; 120 settings_ = settings;
108 121
109 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
110 123
111 return FAILED; 124 return FAILED;
112 } 125 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 173
161 void PrintingContextCairo::ReleaseContext() { 174 void PrintingContextCairo::ReleaseContext() {
162 // Nothing to do yet. 175 // Nothing to do yet.
163 } 176 }
164 177
165 gfx::NativeDrawingContext PrintingContextCairo::context() const { 178 gfx::NativeDrawingContext PrintingContextCairo::context() const {
166 return NULL; 179 return NULL;
167 } 180 }
168 181
169 } // namespace printing 182 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698