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

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

Issue 23116003: Adds PrintingContext implementation stub for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes some build targets and try bots. Some other nits. Created 7 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 7 #include <vector>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/extensions/extension_messages.h" 10 #include "chrome/common/extensions/extension_messages.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 int routing_id, 78 int routing_id,
79 const ExtensionMsg_ExternalConnectionInfo& info, 79 const ExtensionMsg_ExternalConnectionInfo& info,
80 const std::string& channel_name, 80 const std::string& channel_name,
81 int* port_id) { 81 int* port_id) {
82 *port_id = 0; 82 *port_id = 0;
83 } 83 }
84 84
85 #if defined(ENABLE_PRINTING) 85 #if defined(ENABLE_PRINTING)
86 #if defined(OS_CHROMEOS) 86 #if defined(OS_CHROMEOS)
87 void ChromeMockRenderThread::OnAllocateTempFileForPrinting( 87 void ChromeMockRenderThread::OnAllocateTempFileForPrinting(
88 int render_view_id,
88 base::FileDescriptor* renderer_fd, 89 base::FileDescriptor* renderer_fd,
89 int* browser_fd) { 90 int* browser_fd) {
90 renderer_fd->fd = *browser_fd = -1; 91 renderer_fd->fd = *browser_fd = -1;
91 renderer_fd->auto_close = false; 92 renderer_fd->auto_close = false;
92 93
93 base::FilePath path; 94 base::FilePath path;
94 if (file_util::CreateTemporaryFile(&path)) { 95 if (file_util::CreateTemporaryFile(&path)) {
95 int fd = open(path.value().c_str(), O_WRONLY); 96 int fd = open(path.value().c_str(), O_WRONLY);
96 DCHECK_GE(fd, 0); 97 DCHECK_GE(fd, 0);
97 renderer_fd->fd = *browser_fd = fd; 98 renderer_fd->fd = *browser_fd = fd;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 209 }
209 210
210 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) { 211 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) {
211 print_preview_cancel_page_number_ = page; 212 print_preview_cancel_page_number_ = page;
212 } 213 }
213 214
214 int ChromeMockRenderThread::print_preview_pages_remaining() const { 215 int ChromeMockRenderThread::print_preview_pages_remaining() const {
215 return print_preview_pages_remaining_; 216 return print_preview_pages_remaining_;
216 } 217 }
217 #endif // defined(ENABLE_PRINTING) 218 #endif // defined(ENABLE_PRINTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698