OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Multiply-included message file, hence no include guard. | 5 // Multiply-included message file, hence no include guard. |
6 | 6 |
7 #include "components/translate/core/common/language_detection_details.h" | 7 #include "components/translate/core/common/language_detection_details.h" |
8 #include "components/translate/core/common/translate_errors.h" | 8 #include "components/translate/core/common/translate_errors.h" |
9 #include "content/public/common/common_param_traits.h" | 9 #include "content/public/common/common_param_traits.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 #include "ipc/ipc_message_utils.h" | 11 #include "ipc/ipc_message_utils.h" |
12 | 12 |
13 #define IPC_MESSAGE_START TranslateMsgStart | 13 #define IPC_MESSAGE_START TranslateMsgStart |
14 | 14 |
15 IPC_ENUM_TRAITS(TranslateErrors::Type) | 15 IPC_ENUM_TRAITS(translate::TranslateErrors::Type) |
16 | 16 |
17 IPC_STRUCT_TRAITS_BEGIN(LanguageDetectionDetails) | 17 IPC_STRUCT_TRAITS_BEGIN(translate::LanguageDetectionDetails) |
18 IPC_STRUCT_TRAITS_MEMBER(time) | 18 IPC_STRUCT_TRAITS_MEMBER(time) |
19 IPC_STRUCT_TRAITS_MEMBER(url) | 19 IPC_STRUCT_TRAITS_MEMBER(url) |
20 IPC_STRUCT_TRAITS_MEMBER(content_language) | 20 IPC_STRUCT_TRAITS_MEMBER(content_language) |
21 IPC_STRUCT_TRAITS_MEMBER(cld_language) | 21 IPC_STRUCT_TRAITS_MEMBER(cld_language) |
22 IPC_STRUCT_TRAITS_MEMBER(is_cld_reliable) | 22 IPC_STRUCT_TRAITS_MEMBER(is_cld_reliable) |
23 IPC_STRUCT_TRAITS_MEMBER(html_root_language) | 23 IPC_STRUCT_TRAITS_MEMBER(html_root_language) |
24 IPC_STRUCT_TRAITS_MEMBER(adopted_language) | 24 IPC_STRUCT_TRAITS_MEMBER(adopted_language) |
25 IPC_STRUCT_TRAITS_MEMBER(contents) | 25 IPC_STRUCT_TRAITS_MEMBER(contents) |
26 IPC_STRUCT_TRAITS_END() | 26 IPC_STRUCT_TRAITS_END() |
27 | 27 |
(...skipping 18 matching lines...) Expand all Loading... |
46 | 46 |
47 //----------------------------------------------------------------------------- | 47 //----------------------------------------------------------------------------- |
48 // Host messages | 48 // Host messages |
49 // These are messages sent from the renderer to the browser process. | 49 // These are messages sent from the renderer to the browser process. |
50 | 50 |
51 // Notification that the current page was assigned a sequence number. | 51 // Notification that the current page was assigned a sequence number. |
52 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_TranslateAssignedSequenceNumber, | 52 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_TranslateAssignedSequenceNumber, |
53 int /* page_seq_no */) | 53 int /* page_seq_no */) |
54 | 54 |
55 // Notification that the language for the tab has been determined. | 55 // Notification that the language for the tab has been determined. |
56 IPC_MESSAGE_ROUTED2(ChromeViewHostMsg_TranslateLanguageDetermined, | 56 IPC_MESSAGE_ROUTED2( |
57 LanguageDetectionDetails /* details about lang detection */, | 57 ChromeViewHostMsg_TranslateLanguageDetermined, |
58 bool /* whether the page needs translation */) | 58 translate::LanguageDetectionDetails /* details about lang detection */, |
| 59 bool /* whether the page needs translation */) |
59 | 60 |
60 // Notifies the browser that a page has been translated. | 61 // Notifies the browser that a page has been translated. |
61 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_PageTranslated, | 62 IPC_MESSAGE_ROUTED3( |
62 std::string /* the original language */, | 63 ChromeViewHostMsg_PageTranslated, |
63 std::string /* the translated language */, | 64 std::string /* the original language */, |
64 TranslateErrors::Type /* the error type if available */) | 65 std::string /* the translated language */, |
| 66 translate::TranslateErrors::Type /* the error type if available */) |
OLD | NEW |