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

Side by Side Diff: chrome/renderer/chrome_mock_render_thread.cc

Issue 10388214: Make cloud print dialog creation function not use browser list, instead obtain profile and parent w… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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) 2011 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 "chrome/renderer/chrome_mock_render_thread.h" 5 #include "chrome/renderer/chrome_mock_render_thread.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 renderer_fd->auto_close = false; 78 renderer_fd->auto_close = false;
79 79
80 FilePath path; 80 FilePath path;
81 if (file_util::CreateTemporaryFile(&path)) { 81 if (file_util::CreateTemporaryFile(&path)) {
82 int fd = open(path.value().c_str(), O_WRONLY); 82 int fd = open(path.value().c_str(), O_WRONLY);
83 DCHECK_GE(fd, 0); 83 DCHECK_GE(fd, 0);
84 renderer_fd->fd = *browser_fd = fd; 84 renderer_fd->fd = *browser_fd = fd;
85 } 85 }
86 } 86 }
87 87
88 void ChromeMockRenderThread::OnTempFileForPrintingWritten(int browser_fd) { 88 void ChromeMockRenderThread::OnTempFileForPrintingWritten(int render_view_id,
89 int browser_fd) {
89 close(browser_fd); 90 close(browser_fd);
90 } 91 }
91 #endif // defined(OS_CHROMEOS) 92 #endif // defined(OS_CHROMEOS)
92 93
93 void ChromeMockRenderThread::OnGetDefaultPrintSettings( 94 void ChromeMockRenderThread::OnGetDefaultPrintSettings(
94 PrintMsg_Print_Params* params) { 95 PrintMsg_Print_Params* params) {
95 if (printer_.get()) 96 if (printer_.get())
96 printer_->GetDefaultPrintSettings(params); 97 printer_->GetDefaultPrintSettings(params);
97 } 98 }
98 99
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 print_dialog_user_response_ = response; 191 print_dialog_user_response_ = response;
191 } 192 }
192 193
193 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) { 194 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) {
194 print_preview_cancel_page_number_ = page; 195 print_preview_cancel_page_number_ = page;
195 } 196 }
196 197
197 int ChromeMockRenderThread::print_preview_pages_remaining() { 198 int ChromeMockRenderThread::print_preview_pages_remaining() {
198 return print_preview_pages_remaining_; 199 return print_preview_pages_remaining_;
199 } 200 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.h ('k') | chrome/renderer/print_web_view_helper_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698