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

Side by Side Diff: printing/printing_context_chromeos.cc

Issue 2376193006: Disable Ctrl+Shift+P on Chrome OS (Closed)
Patch Set: Fix test. Created 4 years, 2 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_chromeos.h" 5 #include "printing/printing_context_chromeos.h"
6 6
7 #include <cups/cups.h> 7 #include <cups/cups.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <unicode/ulocdata.h> 9 #include <unicode/ulocdata.h>
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 PrintingContextChromeos::~PrintingContextChromeos() { 159 PrintingContextChromeos::~PrintingContextChromeos() {
160 ReleaseContext(); 160 ReleaseContext();
161 } 161 }
162 162
163 void PrintingContextChromeos::AskUserForSettings( 163 void PrintingContextChromeos::AskUserForSettings(
164 int max_pages, 164 int max_pages,
165 bool has_selection, 165 bool has_selection,
166 bool is_scripted, 166 bool is_scripted,
167 const PrintSettingsCallback& callback) { 167 const PrintSettingsCallback& callback) {
168 // We don't want to bring up a dialog here. Ever. Just signal the callback. 168 // We don't want to bring up a dialog here. Ever. This should not be called.
169 callback.Run(OK); 169 NOTREACHED();
170 } 170 }
171 171
172 PrintingContext::Result PrintingContextChromeos::UseDefaultSettings() { 172 PrintingContext::Result PrintingContextChromeos::UseDefaultSettings() {
173 DCHECK(!in_print_job_); 173 DCHECK(!in_print_job_);
174 174
175 ResetSettings(); 175 ResetSettings();
176 176
177 std::string device_name = base::UTF16ToUTF8(settings_.device_name()); 177 std::string device_name = base::UTF16ToUTF8(settings_.device_name());
178 if (device_name.empty()) 178 if (device_name.empty())
179 return OnError(); 179 return OnError();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 DCHECK(in_print_job_); 392 DCHECK(in_print_job_);
393 DCHECK(printer_); 393 DCHECK(printer_);
394 394
395 if (!printer_->StreamData(buffer)) 395 if (!printer_->StreamData(buffer))
396 return OnError(); 396 return OnError();
397 397
398 return OK; 398 return OK;
399 } 399 }
400 400
401 } // namespace printing 401 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698