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

Side by Side Diff: extensions/common/api/messaging/message.h

Issue 240223004: When passing a user gesture along with a message, include the timestamp of the user gesture to prev… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 #ifndef EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_ 5 #ifndef EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_
6 #define EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_ 6 #define EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_
7 7
8 namespace extensions { 8 namespace extensions {
9 9
10 // A message consists of both the data itself as well as a user gesture state. 10 // A message consists of both the data itself as well as a user gesture state.
11 struct Message { 11 struct Message {
12 std::string data; 12 std::string data;
13 bool user_gesture; 13 bool user_gesture;
14 double user_gesture_timestamp;
14 15
15 Message() : data(), user_gesture(false) {} 16 Message() : data() {}
16 Message(const std::string& data, bool user_gesture) 17 Message(const std::string& data,
17 : data(data), user_gesture(user_gesture) {} 18 bool user_gesture,
19 double user_gesture_timestamp)
20 : data(data),
21 user_gesture(user_gesture),
22 user_gesture_timestamp(user_gesture_timestamp) {}
18 }; 23 };
19 24
20 } // namespace extensions 25 } // namespace extensions
21 26
22 #endif // EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_ 27 #endif // EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/messaging_bindings.cc ('k') | extensions/common/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698