| 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 // Notification that renderer should run some JavaScript code. | 909 // Notification that renderer should run some JavaScript code. |
| 910 IPC_MESSAGE_ROUTED1(ViewMsg_ExecuteCode, | 910 IPC_MESSAGE_ROUTED1(ViewMsg_ExecuteCode, |
| 911 ViewMsg_ExecuteCode_Params) | 911 ViewMsg_ExecuteCode_Params) |
| 912 | 912 |
| 913 #if defined(IPC_MESSAGE_LOG_ENABLED) | 913 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 914 // Tell the renderer process to begin or end IPC message logging. | 914 // Tell the renderer process to begin or end IPC message logging. |
| 915 IPC_MESSAGE_CONTROL1(ViewMsg_SetIPCLoggingEnabled, | 915 IPC_MESSAGE_CONTROL1(ViewMsg_SetIPCLoggingEnabled, |
| 916 bool /* on or off */) | 916 bool /* on or off */) |
| 917 #endif | 917 #endif |
| 918 | 918 |
| 919 // Socket Stream messages: | |
| 920 // These are messages from the browser to the SocketStreamHandle on | |
| 921 // a renderer. | |
| 922 | |
| 923 // A |socket_id| is assigned by ViewHostMsg_SocketStream_Connect. | |
| 924 // The Socket Stream is connected. The SocketStreamHandle should keep track | |
| 925 // of how much it has pending (how much it has requested to be sent) and | |
| 926 // shouldn't go over |max_pending_send_allowed| bytes. | |
| 927 IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_Connected, | |
| 928 int /* socket_id */, | |
| 929 int /* max_pending_send_allowed */) | |
| 930 | |
| 931 // |data| is received on the Socket Stream. | |
| 932 IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_ReceivedData, | |
| 933 int /* socket_id */, | |
| 934 std::vector<char> /* data */) | |
| 935 | |
| 936 // |amount_sent| bytes of data requested by | |
| 937 // ViewHostMsg_SocketStream_SendData has been sent on the Socket Stream. | |
| 938 IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_SentData, | |
| 939 int /* socket_id */, | |
| 940 int /* amount_sent */) | |
| 941 | |
| 942 // The Socket Stream is closed. | |
| 943 IPC_MESSAGE_CONTROL1(ViewMsg_SocketStream_Closed, | |
| 944 int /* socket_id */) | |
| 945 | |
| 946 // SpellChecker messages. | 919 // SpellChecker messages. |
| 947 | 920 |
| 948 // Passes some initialization params to the renderer's spellchecker. This can | 921 // Passes some initialization params to the renderer's spellchecker. This can |
| 949 // be called directly after startup or in (async) response to a | 922 // be called directly after startup or in (async) response to a |
| 950 // RequestDictionary ViewHost message. | 923 // RequestDictionary ViewHost message. |
| 951 IPC_MESSAGE_CONTROL4(ViewMsg_SpellChecker_Init, | 924 IPC_MESSAGE_CONTROL4(ViewMsg_SpellChecker_Init, |
| 952 IPC::PlatformFileForTransit /* bdict_file */, | 925 IPC::PlatformFileForTransit /* bdict_file */, |
| 953 std::vector<std::string> /* custom_dict_words */, | 926 std::vector<std::string> /* custom_dict_words */, |
| 954 std::string /* language */, | 927 std::string /* language */, |
| 955 bool /* auto spell correct */) | 928 bool /* auto spell correct */) |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2287 std::string /* the language */) | 2260 std::string /* the language */) |
| 2288 | 2261 |
| 2289 // Notifies the browser that a page has been translated. | 2262 // Notifies the browser that a page has been translated. |
| 2290 IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated, | 2263 IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated, |
| 2291 int, /* page id */ | 2264 int, /* page id */ |
| 2292 std::string /* the original language */, | 2265 std::string /* the original language */, |
| 2293 std::string /* the translated language */, | 2266 std::string /* the translated language */, |
| 2294 TranslateErrors::Type /* the error type if available */) | 2267 TranslateErrors::Type /* the error type if available */) |
| 2295 | 2268 |
| 2296 //--------------------------------------------------------------------------- | 2269 //--------------------------------------------------------------------------- |
| 2297 // Socket Stream messages: | |
| 2298 // These are messages from the SocketStreamHandle to the browser. | |
| 2299 | |
| 2300 // Open new Socket Stream for the |socket_url| identified by |socket_id| | |
| 2301 // in the renderer process. | |
| 2302 // The browser starts connecting asynchronously. | |
| 2303 // Once Socket Stream connection is established, the browser will send | |
| 2304 // ViewMsg_SocketStream_Connected back. | |
| 2305 IPC_MESSAGE_CONTROL2(ViewHostMsg_SocketStream_Connect, | |
| 2306 GURL /* socket_url */, | |
| 2307 int /* socket_id */) | |
| 2308 | |
| 2309 // Request to send data on the Socket Stream. | |
| 2310 // SocketStreamHandle can send data at most |max_pending_send_allowed| bytes, | |
| 2311 // which is given by ViewMsg_SocketStream_Connected at any time. | |
| 2312 // The number of pending bytes can be tracked by size of |data| sent | |
| 2313 // and |amount_sent| parameter of ViewMsg_SocketStream_DataSent. | |
| 2314 // That is, the following constraints is applied: | |
| 2315 // (accumulated total of |data|) - (accumulated total of |amount_sent|) | |
| 2316 // <= |max_pending_send_allowed| | |
| 2317 // If the SocketStreamHandle ever tries to exceed the | |
| 2318 // |max_pending_send_allowed|, the connection will be closed. | |
| 2319 IPC_MESSAGE_CONTROL2(ViewHostMsg_SocketStream_SendData, | |
| 2320 int /* socket_id */, | |
| 2321 std::vector<char> /* data */) | |
| 2322 | |
| 2323 // Request to close the Socket Stream. | |
| 2324 // The browser will send ViewMsg_SocketStream_Closed back when the Socket | |
| 2325 // Stream is completely closed. | |
| 2326 IPC_MESSAGE_CONTROL1(ViewHostMsg_SocketStream_Close, | |
| 2327 int /* socket_id */) | |
| 2328 | |
| 2329 //--------------------------------------------------------------------------- | |
| 2330 // Request for cryptographic operation messages: | 2270 // Request for cryptographic operation messages: |
| 2331 // These are messages from the renderer to the browser to perform a | 2271 // These are messages from the renderer to the browser to perform a |
| 2332 // cryptographic operation. | 2272 // cryptographic operation. |
| 2333 | 2273 |
| 2334 // Asks the browser process to generate a keypair for grabbing a client | 2274 // Asks the browser process to generate a keypair for grabbing a client |
| 2335 // certificate from a CA (<keygen> tag), and returns the signed public | 2275 // certificate from a CA (<keygen> tag), and returns the signed public |
| 2336 // key and challenge string. | 2276 // key and challenge string. |
| 2337 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen, | 2277 IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_Keygen, |
| 2338 uint32 /* key size index */, | 2278 uint32 /* key size index */, |
| 2339 std::string /* challenge string */, | 2279 std::string /* challenge string */, |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2541 // while performing stress testing. | 2481 // while performing stress testing. |
| 2542 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl, | 2482 IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl, |
| 2543 int /* cmd */, | 2483 int /* cmd */, |
| 2544 int /* param */) | 2484 int /* param */) |
| 2545 | 2485 |
| 2546 // Register a new handler for URL requests with the given scheme. | 2486 // Register a new handler for URL requests with the given scheme. |
| 2547 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, | 2487 IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler, |
| 2548 std::string /* scheme */, | 2488 std::string /* scheme */, |
| 2549 GURL /* url */, | 2489 GURL /* url */, |
| 2550 string16 /* title */) | 2490 string16 /* title */) |
| OLD | NEW |