OLD | NEW |
---|---|
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 "content/common/common_param_traits.h" | 5 #include "content/common/common_param_traits.h" |
6 | 6 |
7 #include "content/common/content_constants.h" | 7 #include "content/common/content_constants.h" |
8 #include "net/base/host_port_pair.h" | 8 #include "net/base/host_port_pair.h" |
9 #include "net/base/upload_data.h" | 9 #include "net/base/upload_data.h" |
10 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
14 #include "webkit/glue/password_form.h" | |
14 #include "webkit/glue/resource_loader_bridge.h" | 15 #include "webkit/glue/resource_loader_bridge.h" |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 struct SkBitmap_Data { | 19 struct SkBitmap_Data { |
19 // The configuration for the bitmap (bits per pixel, etc). | 20 // The configuration for the bitmap (bits per pixel, etc). |
20 SkBitmap::Config fConfig; | 21 SkBitmap::Config fConfig; |
21 | 22 |
22 // The width of the bitmap in pixels. | 23 // The width of the bitmap in pixels. |
23 uint32 fWidth; | 24 uint32 fWidth; |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
829 } | 830 } |
830 const SkBitmap_Data* bmp_data = | 831 const SkBitmap_Data* bmp_data = |
831 reinterpret_cast<const SkBitmap_Data*>(fixed_data); | 832 reinterpret_cast<const SkBitmap_Data*>(fixed_data); |
832 return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size); | 833 return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size); |
833 } | 834 } |
834 | 835 |
835 void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) { | 836 void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) { |
836 l->append("<SkBitmap>"); | 837 l->append("<SkBitmap>"); |
837 } | 838 } |
838 | 839 |
840 void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m, | |
841 const param_type& p) { | |
Tom Sepez
2011/03/23 17:32:53
Can this be macro-ized?
jam
2011/03/23 18:21:02
the problem is that this is used by another file,
| |
842 WriteParam(m, p.signon_realm); | |
843 WriteParam(m, p.origin); | |
844 WriteParam(m, p.action); | |
845 WriteParam(m, p.submit_element); | |
846 WriteParam(m, p.username_element); | |
847 WriteParam(m, p.username_value); | |
848 WriteParam(m, p.password_element); | |
849 WriteParam(m, p.password_value); | |
850 WriteParam(m, p.old_password_element); | |
851 WriteParam(m, p.old_password_value); | |
852 WriteParam(m, p.ssl_valid); | |
853 WriteParam(m, p.preferred); | |
854 WriteParam(m, p.blacklisted_by_user); | |
855 } | |
856 | |
857 bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter, | |
858 param_type* p) { | |
859 return | |
860 ReadParam(m, iter, &p->signon_realm) && | |
861 ReadParam(m, iter, &p->origin) && | |
862 ReadParam(m, iter, &p->action) && | |
863 ReadParam(m, iter, &p->submit_element) && | |
864 ReadParam(m, iter, &p->username_element) && | |
865 ReadParam(m, iter, &p->username_value) && | |
866 ReadParam(m, iter, &p->password_element) && | |
867 ReadParam(m, iter, &p->password_value) && | |
868 ReadParam(m, iter, &p->old_password_element) && | |
869 ReadParam(m, iter, &p->old_password_value) && | |
870 ReadParam(m, iter, &p->ssl_valid) && | |
871 ReadParam(m, iter, &p->preferred) && | |
872 ReadParam(m, iter, &p->blacklisted_by_user); | |
873 } | |
874 void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p, | |
875 std::string* l) { | |
876 l->append("<PasswordForm>"); | |
877 } | |
878 | |
839 } // namespace IPC | 879 } // namespace IPC |
OLD | NEW |