| 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 <ostream> | 5 #include <ostream> |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "webkit/glue/web_intent_service_data.h" | 8 #include "webkit/glue/web_intent_service_data.h" |
| 9 | 9 |
| 10 namespace webkit_glue { |
| 11 |
| 10 WebIntentServiceData::WebIntentServiceData() | 12 WebIntentServiceData::WebIntentServiceData() |
| 11 : disposition(WebIntentServiceData::DISPOSITION_WINDOW) { | 13 : disposition(WebIntentServiceData::DISPOSITION_WINDOW) { |
| 12 } | 14 } |
| 13 | 15 |
| 14 WebIntentServiceData::~WebIntentServiceData() {} | 16 WebIntentServiceData::~WebIntentServiceData() {} |
| 15 | 17 |
| 16 bool WebIntentServiceData::operator==(const WebIntentServiceData& other) const { | 18 bool WebIntentServiceData::operator==(const WebIntentServiceData& other) const { |
| 17 return service_url == other.service_url && | 19 return service_url == other.service_url && |
| 18 action == other.action && | 20 action == other.action && |
| 19 type == other.type && | 21 type == other.type && |
| 20 title == other.title && | 22 title == other.title && |
| 21 disposition == other.disposition; | 23 disposition == other.disposition; |
| 22 } | 24 } |
| 23 | 25 |
| 24 std::ostream& operator<<(::std::ostream& os, | 26 std::ostream& operator<<(::std::ostream& os, |
| 25 const WebIntentServiceData& intent) { | 27 const WebIntentServiceData& intent) { |
| 26 return os << | 28 return os << |
| 27 "{" << intent.service_url << | 29 "{" << intent.service_url << |
| 28 ", " << UTF16ToUTF8(intent.action) << | 30 ", " << UTF16ToUTF8(intent.action) << |
| 29 ", " << UTF16ToUTF8(intent.type) << | 31 ", " << UTF16ToUTF8(intent.type) << |
| 30 ", " << UTF16ToUTF8(intent.title) << | 32 ", " << UTF16ToUTF8(intent.title) << |
| 31 ", " << intent.disposition << | 33 ", " << intent.disposition << |
| 32 "}"; | 34 "}"; |
| 33 } | 35 } |
| 36 |
| 37 } // namespace webkit_glue |
| OLD | NEW |