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

Side by Side Diff: content/public/common/common_param_traits.cc

Issue 10577040: Generate param traits even when shared by mutliple message files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 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 "content/public/common/common_param_traits.h" 5 #include "content/public/common/common_param_traits.h"
6 6
7 #include "content/public/common/content_constants.h" 7 #include "content/public/common/content_constants.h"
8 #include "content/public/common/referrer.h" 8 #include "content/public/common/referrer.h"
9 #include "net/base/host_port_pair.h" 9 #include "net/base/host_port_pair.h"
10 #include "net/base/upload_data.h" 10 #include "net/base/upload_data.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 } 546 }
547 const SkBitmap_Data* bmp_data = 547 const SkBitmap_Data* bmp_data =
548 reinterpret_cast<const SkBitmap_Data*>(fixed_data); 548 reinterpret_cast<const SkBitmap_Data*>(fixed_data);
549 return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size); 549 return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size);
550 } 550 }
551 551
552 void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) { 552 void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) {
553 l->append("<SkBitmap>"); 553 l->append("<SkBitmap>");
554 } 554 }
555 555
556 void ParamTraits<content::ConsoleMessageLevel>::Write(Message* m, 556 } // namespace IPC
557 const param_type& p) {
558 m->WriteInt(static_cast<int>(p));
559 }
560 557
561 bool ParamTraits<content::ConsoleMessageLevel>::Read(const Message* m, 558 // Generate param traits write methods.
562 PickleIterator* iter, 559 #include "ipc/param_traits_write_macros.h"
563 param_type* p) { 560 namespace IPC {
564 int type; 561 #include "content/public/common/common_param_traits_defs.h"
565 if (!m->ReadInt(iter, &type)) 562 } // namespace IPC
566 return false;
567 *p = static_cast<param_type>(type);
568 return true;
569 }
570 563
571 void ParamTraits<content::ConsoleMessageLevel>::Log(const param_type& p, 564 // Generate param traits read methods.
572 std::string* l) { 565 #include "ipc/param_traits_read_macros.h"
573 std::string level; 566 namespace IPC {
574 switch (p) { 567 #include "content/public/common/common_param_traits_defs.h"
575 case content::CONSOLE_MESSAGE_LEVEL_TIP: 568 } // namespace IPC
576 level = "CONSOLE_MESSAGE_LEVEL_TIP";
577 break;
578 case content::CONSOLE_MESSAGE_LEVEL_LOG:
579 level = "CONSOLE_MESSAGE_LEVEL_LOG";
580 break;
581 case content::CONSOLE_MESSAGE_LEVEL_WARNING:
582 level = "CONSOLE_MESSAGE_LEVEL_WARNING";
583 break;
584 case content::CONSOLE_MESSAGE_LEVEL_ERROR:
585 level = "CONSOLE_MESSAGE_LEVEL_ERROR";
586 break;
587 }
588 LogParam(level, l);
589 }
590 569
570 // Generate param traits log methods.
571 #include "ipc/param_traits_log_macros.h"
572 namespace IPC {
573 #include "content/public/common/common_param_traits_defs.h"
591 } // namespace IPC 574 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698