api_messages.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 "content/public/common/referrer.h"
  10. #include "ipc/ipc_message_macros.h"
  11. #include "ui/gfx/geometry/rect_f.h"
  12. #include "ui/gfx/ipc/gfx_param_traits.h"
  13. #include "url/gurl.h"
  14. // The message starter should be declared in ipc/ipc_message_start.h. Since
  15. // we don't want to patch Chromium, we just pretend to be Content Shell.
  16. #define IPC_MESSAGE_START ShellMsgStart
  17. IPC_STRUCT_TRAITS_BEGIN(atom::DraggableRegion)
  18. IPC_STRUCT_TRAITS_MEMBER(draggable)
  19. IPC_STRUCT_TRAITS_MEMBER(bounds)
  20. IPC_STRUCT_TRAITS_END()
  21. IPC_MESSAGE_ROUTED2(AtomFrameHostMsg_Message,
  22. base::string16 /* channel */,
  23. base::ListValue /* arguments */)
  24. IPC_SYNC_MESSAGE_ROUTED2_1(AtomFrameHostMsg_Message_Sync,
  25. base::string16 /* channel */,
  26. base::ListValue /* arguments */,
  27. base::ListValue /* result */)
  28. IPC_MESSAGE_ROUTED3(AtomFrameMsg_Message,
  29. bool /* send_to_all */,
  30. base::string16 /* channel */,
  31. base::ListValue /* arguments */)
  32. IPC_MESSAGE_ROUTED0(AtomViewMsg_Offscreen)
  33. IPC_MESSAGE_ROUTED3(AtomAutofillFrameHostMsg_ShowPopup,
  34. gfx::RectF /* bounds */,
  35. std::vector<base::string16> /* values */,
  36. std::vector<base::string16> /* labels */)
  37. IPC_MESSAGE_ROUTED0(AtomAutofillFrameHostMsg_HidePopup)
  38. IPC_MESSAGE_ROUTED1(AtomAutofillFrameMsg_AcceptSuggestion,
  39. base::string16 /* suggestion */)
  40. // Sent by the renderer when the draggable regions are updated.
  41. IPC_MESSAGE_ROUTED1(AtomFrameHostMsg_UpdateDraggableRegions,
  42. std::vector<atom::DraggableRegion> /* regions */)
  43. // Update renderer process preferences.
  44. IPC_MESSAGE_CONTROL1(AtomMsg_UpdatePreferences, base::ListValue)
  45. // Sent by renderer to set the temporary zoom level.
  46. IPC_SYNC_MESSAGE_ROUTED1_1(AtomFrameHostMsg_SetTemporaryZoomLevel,
  47. double /* zoom level */,
  48. double /* result */)
  49. // Sent by renderer to get the zoom level.
  50. IPC_SYNC_MESSAGE_ROUTED0_1(AtomFrameHostMsg_GetZoomLevel, double /* result */)
  51. // Brings up SaveAs... dialog to save specified URL.
  52. IPC_MESSAGE_ROUTED2(AtomFrameHostMsg_PDFSaveURLAs,
  53. GURL /* url */,
  54. content::Referrer /* referrer */)