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

Side by Side Diff: components/network_hints/common/network_hints_messages.h

Issue 2778173002: Revert of "Speculatively launch Service Workers on mouse/touch events." (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
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 file, no traditional include guard. 5 // Multiply-included file, no traditional include guard.
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "components/network_hints/common/network_hints_common.h" 9 #include "components/network_hints/common/network_hints_common.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 #include "third_party/WebKit/public/platform/WebNavigationHintType.h"
13 #include "url/ipc/url_param_traits.h" 12 #include "url/ipc/url_param_traits.h"
14 13
15 // Singly-included section for custom IPC traits. 14 // Singly-included section for custom IPC traits.
16 #ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ 15 #ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_
17 #define COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ 16 #define COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_
18 17
19 namespace IPC { 18 namespace IPC {
20 19
21 template <> 20 template <>
22 struct ParamTraits<network_hints::LookupRequest> { 21 struct ParamTraits<network_hints::LookupRequest> {
23 typedef network_hints::LookupRequest param_type; 22 typedef network_hints::LookupRequest param_type;
24 static void Write(base::Pickle* m, const param_type& p); 23 static void Write(base::Pickle* m, const param_type& p);
25 static bool Read(const base::Pickle* m, 24 static bool Read(const base::Pickle* m,
26 base::PickleIterator* iter, 25 base::PickleIterator* iter,
27 param_type* r); 26 param_type* r);
28 static void Log(const param_type& p, std::string* l); 27 static void Log(const param_type& p, std::string* l);
29 }; 28 };
30 29
31 } // namespace IPC 30 } // namespace IPC
32 31
33 #endif // COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_ 32 #endif // COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_
34 33
35 #define IPC_MESSAGE_START NetworkHintsMsgStart 34 #define IPC_MESSAGE_START NetworkHintsMsgStart
36 35
37 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNavigationHintType,
38 blink::WebNavigationHintType::Last)
39
40 //----------------------------------------------------------------------------- 36 //-----------------------------------------------------------------------------
41 // Host messages 37 // Host messages
42 // These are messages sent from the renderer process to the browser process. 38 // These are messages sent from the renderer process to the browser process.
43 39
44 // Request for a DNS prefetch of the names in the array. 40 // Request for a DNS prefetch of the names in the array.
45 // NameList is typedef'ed std::vector<std::string> 41 // NameList is typedef'ed std::vector<std::string>
46 IPC_MESSAGE_CONTROL1(NetworkHintsMsg_DNSPrefetch, 42 IPC_MESSAGE_CONTROL1(NetworkHintsMsg_DNSPrefetch,
47 network_hints::LookupRequest) 43 network_hints::LookupRequest)
48 44
49 45
50 // Request for preconnect to host providing resource specified by URL 46 // Request for preconnect to host providing resource specified by URL
51 IPC_MESSAGE_CONTROL3(NetworkHintsMsg_Preconnect, 47 IPC_MESSAGE_CONTROL3(NetworkHintsMsg_Preconnect,
52 GURL /* preconnect target url */, 48 GURL /* preconnect target url */,
53 bool /* Does connection have its credentials flag set */, 49 bool /* Does connection have its credentials flag set */,
54 int /* number of connections */) 50 int /* number of connections */)
55
56 // Request to trigger possible optimizations for navigation.
57 IPC_MESSAGE_CONTROL2(NetworkHintsMsg_NavigationHint,
58 GURL /* document url */,
59 blink::WebNavigationHintType /* navigation hint type */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698