message.h revision effb81e5f8246d0db0270817048dc992db66e9fb
1effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch// Copyright 2014 The Chromium Authors. All rights reserved.
21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// found in the LICENSE file.
41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
5effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch#ifndef EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_
6effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch#define EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_
71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)namespace extensions {
91e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
10effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch// A message consists of both the data itself as well as a user gesture state.
111e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)struct Message {
121e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  std::string data;
131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  bool user_gesture;
141e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
151e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  Message() : data(), user_gesture(false) {}
161e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  Message(const std::string& data, bool user_gesture)
171e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)      : data(data), user_gesture(user_gesture) {}
181e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)};
191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)}  // namespace extensions
211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)
22effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch#endif  // EXTENSIONS_COMMON_API_MESSAGING_MESSAGE_H_
23