Windows should animate when they are about to get docked at screen edges.
[chromium-blink-merge.git] / apps / app_shim / app_shim_messages.h
blob85a1df3695ba35c6d3078280bf5b9cccc9ca5b9c
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Multiply-included message file, hence no include guard.
7 #include <string>
9 #include "apps/app_shim/app_shim_launch.h"
10 #include "base/files/file_path.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "ipc/param_traits_macros.h"
14 #define IPC_MESSAGE_START AppShimMsgStart
16 IPC_ENUM_TRAITS_MAX_VALUE(apps::AppShimLaunchType,
17 apps::APP_SHIM_LAUNCH_NUM_TYPES - 1)
18 IPC_ENUM_TRAITS_MAX_VALUE(apps::AppShimLaunchResult,
19 apps::APP_SHIM_LAUNCH_NUM_RESULTS - 1)
20 IPC_ENUM_TRAITS_MAX_VALUE(apps::AppShimFocusType,
21 apps::APP_SHIM_FOCUS_NUM_TYPES - 1)
23 // Signals that a previous LaunchApp message has been processed, and lets the
24 // app shim process know whether it was registered successfully.
25 IPC_MESSAGE_CONTROL1(AppShimMsg_LaunchApp_Done,
26 apps::AppShimLaunchResult /* launch result */)
28 // Signals to the main Chrome process that a shim has started indicating the
29 // profile and app_id that the shim should be associated with and whether to
30 // launch the app immediately.
31 IPC_MESSAGE_CONTROL3(AppShimHostMsg_LaunchApp,
32 base::FilePath /* profile dir */,
33 std::string /* app id */,
34 apps::AppShimLaunchType /* launch type */)
36 // Sent when the user has indicated a desire to focus the app, either by
37 // clicking on the app's icon in the dock or by selecting it with Cmd+Tab. In
38 // response, Chrome brings the app's windows to the foreground, or relaunches
39 // if the focus type indicates a reopen and there are no open windows.
40 IPC_MESSAGE_CONTROL1(AppShimHostMsg_FocusApp,
41 apps::AppShimFocusType /* focus type */)
43 // Sent when the app shim is hidden or unhidden.
44 IPC_MESSAGE_CONTROL1(AppShimHostMsg_SetAppHidden,
45 bool /* hidden */)
47 // Sent when the shim process receives a request to terminate. Once all of the
48 // app's windows have closed, and the extension is unloaded, the AppShimHost
49 // closes the channel. The shim process then completes the terminate request
50 // and exits.
51 IPC_MESSAGE_CONTROL0(AppShimHostMsg_QuitApp)