api_messages.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (c) 2013 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. // Multiply-included file, no traditional include guard.
  5. #include "atom/common/draggable_region.h"
  6. #include "base/strings/string16.h"
  7. #include "base/values.h"
  8. #include "content/public/common/common_param_traits.h"
  9. #include "ipc/ipc_message_macros.h"
  10. #include "ui/gfx/ipc/gfx_param_traits.h"
  11. // The message starter should be declared in ipc/ipc_message_start.h. Since
  12. // we don't want to patch Chromium, we just pretend to be Content Shell.
  13. #define IPC_MESSAGE_START ShellMsgStart
  14. IPC_STRUCT_TRAITS_BEGIN(atom::DraggableRegion)
  15. IPC_STRUCT_TRAITS_MEMBER(draggable)
  16. IPC_STRUCT_TRAITS_MEMBER(bounds)
  17. IPC_STRUCT_TRAITS_END()
  18. IPC_MESSAGE_ROUTED2(AtomViewHostMsg_Message,
  19. base::string16 /* channel */,
  20. base::ListValue /* arguments */)
  21. IPC_SYNC_MESSAGE_ROUTED2_1(AtomViewHostMsg_Message_Sync,
  22. base::string16 /* channel */,
  23. base::ListValue /* arguments */,
  24. base::string16 /* result (in JSON) */)
  25. IPC_MESSAGE_ROUTED3(AtomViewMsg_Message,
  26. bool /* send_to_all */,
  27. base::string16 /* channel */,
  28. base::ListValue /* arguments */)
  29. // Sent by the renderer when the draggable regions are updated.
  30. IPC_MESSAGE_ROUTED1(AtomViewHostMsg_UpdateDraggableRegions,
  31. std::vector<atom::DraggableRegion> /* regions */)
  32. // Update renderer process preferences.
  33. IPC_MESSAGE_CONTROL1(AtomMsg_UpdatePreferences, base::ListValue)