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

Side by Side Diff: chrome/common/render_messages.h

Issue 149181: Move Emf class to the printing library. Also creates a platform agnostic Nat... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/common/gfx/emf_unittest.cc ('k') | chrome/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include <map> 10 #include <map>
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 ViewMsg_Print_Params params; 328 ViewMsg_Print_Params params;
329 329
330 // If empty, this means a request to render all the printed pages. 330 // If empty, this means a request to render all the printed pages.
331 std::vector<int> pages; 331 std::vector<int> pages;
332 }; 332 };
333 333
334 // Parameters to describe a rendered page. 334 // Parameters to describe a rendered page.
335 struct ViewHostMsg_DidPrintPage_Params { 335 struct ViewHostMsg_DidPrintPage_Params {
336 // A shared memory handle to the EMF data. This data can be quite large so a 336 // A shared memory handle to the EMF data. This data can be quite large so a
337 // memory map needs to be used. 337 // memory map needs to be used.
338 base::SharedMemoryHandle emf_data_handle; 338 base::SharedMemoryHandle metafile_data_handle;
339 339
340 // Size of the EMF data. 340 // Size of the metafile data.
341 unsigned data_size; 341 unsigned data_size;
342 342
343 // Cookie for the document to ensure correctness. 343 // Cookie for the document to ensure correctness.
344 int document_cookie; 344 int document_cookie;
345 345
346 // Page number. 346 // Page number.
347 int page_number; 347 int page_number;
348 348
349 // Shrink factor used to render this page. 349 // Shrink factor used to render this page.
350 double actual_shrink; 350 double actual_shrink;
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 static void Log(const param_type& p, std::wstring* l) { 1483 static void Log(const param_type& p, std::wstring* l) {
1484 l->append(L"<ViewMsg_PrintPages_Params>"); 1484 l->append(L"<ViewMsg_PrintPages_Params>");
1485 } 1485 }
1486 }; 1486 };
1487 1487
1488 // Traits for ViewHostMsg_DidPrintPage_Params 1488 // Traits for ViewHostMsg_DidPrintPage_Params
1489 template <> 1489 template <>
1490 struct ParamTraits<ViewHostMsg_DidPrintPage_Params> { 1490 struct ParamTraits<ViewHostMsg_DidPrintPage_Params> {
1491 typedef ViewHostMsg_DidPrintPage_Params param_type; 1491 typedef ViewHostMsg_DidPrintPage_Params param_type;
1492 static void Write(Message* m, const param_type& p) { 1492 static void Write(Message* m, const param_type& p) {
1493 WriteParam(m, p.emf_data_handle); 1493 WriteParam(m, p.metafile_data_handle);
1494 WriteParam(m, p.data_size); 1494 WriteParam(m, p.data_size);
1495 WriteParam(m, p.document_cookie); 1495 WriteParam(m, p.document_cookie);
1496 WriteParam(m, p.page_number); 1496 WriteParam(m, p.page_number);
1497 WriteParam(m, p.actual_shrink); 1497 WriteParam(m, p.actual_shrink);
1498 } 1498 }
1499 static bool Read(const Message* m, void** iter, param_type* p) { 1499 static bool Read(const Message* m, void** iter, param_type* p) {
1500 return ReadParam(m, iter, &p->emf_data_handle) && 1500 return ReadParam(m, iter, &p->metafile_data_handle) &&
1501 ReadParam(m, iter, &p->data_size) && 1501 ReadParam(m, iter, &p->data_size) &&
1502 ReadParam(m, iter, &p->document_cookie) && 1502 ReadParam(m, iter, &p->document_cookie) &&
1503 ReadParam(m, iter, &p->page_number) && 1503 ReadParam(m, iter, &p->page_number) &&
1504 ReadParam(m, iter, &p->actual_shrink); 1504 ReadParam(m, iter, &p->actual_shrink);
1505 } 1505 }
1506 static void Log(const param_type& p, std::wstring* l) { 1506 static void Log(const param_type& p, std::wstring* l) {
1507 l->append(L"<ViewHostMsg_DidPrintPage_Params>"); 1507 l->append(L"<ViewHostMsg_DidPrintPage_Params>");
1508 } 1508 }
1509 }; 1509 };
1510 1510
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 } 1913 }
1914 }; 1914 };
1915 1915
1916 } // namespace IPC 1916 } // namespace IPC
1917 1917
1918 1918
1919 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 1919 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
1920 #include "chrome/common/ipc_message_macros.h" 1920 #include "chrome/common/ipc_message_macros.h"
1921 1921
1922 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 1922 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/common/gfx/emf_unittest.cc ('k') | chrome/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698