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

Side by Side Diff: apps/app_shim/app_shim_handler_mac.h

Issue 14579006: Start app shim when app launched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 7 years, 6 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
« no previous file with comments | « apps/DEPS ('k') | apps/app_shim/app_shim_host_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ 5 #ifndef APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_
6 #define APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ 6 #define APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "apps/app_shim/app_shim_launch.h"
11
10 class Profile; 12 class Profile;
11 13
12 namespace apps { 14 namespace apps {
13 15
14 // Registrar, and interface for services that can handle interactions with OSX 16 // Registrar, and interface for services that can handle interactions with OSX
15 // shim processes. 17 // shim processes.
16 class AppShimHandler { 18 class AppShimHandler {
17 public: 19 public:
18 class Host { 20 class Host {
19 public: 21 public:
(...skipping 19 matching lines...) Expand all
39 // none registered, it returns the default handler or NULL if there is no 41 // none registered, it returns the default handler or NULL if there is no
40 // default handler. 42 // default handler.
41 static AppShimHandler* GetForAppMode(const std::string& app_mode_id); 43 static AppShimHandler* GetForAppMode(const std::string& app_mode_id);
42 44
43 // Sets the default handler to return when there is no app-specific handler. 45 // Sets the default handler to return when there is no app-specific handler.
44 // Setting this to NULL removes the default handler. 46 // Setting this to NULL removes the default handler.
45 static void SetDefaultHandler(AppShimHandler* handler); 47 static void SetDefaultHandler(AppShimHandler* handler);
46 48
47 // Invoked by the shim host when the shim process is launched. The handler 49 // Invoked by the shim host when the shim process is launched. The handler
48 // must return true if successful, or false to indicate back to the shim 50 // must return true if successful, or false to indicate back to the shim
49 // process that it should close. 51 // process that it should close. |launch_now| indicates whether to launch the
50 virtual bool OnShimLaunch(Host* host) = 0; 52 // associated app.
53 virtual bool OnShimLaunch(Host* host, AppShimLaunchType launch_type) = 0;
51 54
52 // Invoked by the shim host when the connection to the shim process is closed. 55 // Invoked by the shim host when the connection to the shim process is closed.
53 virtual void OnShimClose(Host* host) = 0; 56 virtual void OnShimClose(Host* host) = 0;
54 57
55 // Invoked by the shim host when the shim process receives a focus event. 58 // Invoked by the shim host when the shim process receives a focus event.
56 virtual void OnShimFocus(Host* host) = 0; 59 virtual void OnShimFocus(Host* host) = 0;
57 60
58 // Invoked by the shim host when the shim process receives a quit event. 61 // Invoked by the shim host when the shim process receives a quit event.
59 virtual void OnShimQuit(Host* host) = 0; 62 virtual void OnShimQuit(Host* host) = 0;
60 63
61 protected: 64 protected:
62 AppShimHandler() {} 65 AppShimHandler() {}
63 virtual ~AppShimHandler() {} 66 virtual ~AppShimHandler() {}
64 }; 67 };
65 68
66 } // namespace apps 69 } // namespace apps
67 70
68 #endif // APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_ 71 #endif // APPS_APP_SHIM_APP_SHIM_HANDLER_MAC_H_
OLDNEW
« no previous file with comments | « apps/DEPS ('k') | apps/app_shim/app_shim_host_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698