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

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

Issue 461303002: [Mac] Bounce app shims when app windows request attention. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 4 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
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_EXTENSION_APP_SHIM_HANDLER_MAC_H_ 5 #ifndef APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_
6 #define APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ 6 #define APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 AppShimHandler::Host* FindHost(Profile* profile, const std::string& app_id); 74 AppShimHandler::Host* FindHost(Profile* profile, const std::string& app_id);
75 75
76 static void QuitAppForWindow(AppWindow* app_window); 76 static void QuitAppForWindow(AppWindow* app_window);
77 77
78 static void HideAppForWindow(AppWindow* app_window); 78 static void HideAppForWindow(AppWindow* app_window);
79 79
80 static void FocusAppForWindow(AppWindow* app_window); 80 static void FocusAppForWindow(AppWindow* app_window);
81 81
82 // Brings the window to the front without showing it and instructs the shim to 82 // Brings the window to the front without showing it and instructs the shim to
83 // request user attention. Returns false if there is no shim for this window. 83 // request user attention. If there is no shim, show the app and return false.
84 static bool RequestUserAttentionForWindow(AppWindow* app_window); 84 static bool ActivateAndRequestUserAttentionForWindow(AppWindow* app_window);
85
86 // Instructs the shim to request user attention. Returns false if there is no
87 // shim for this window.
88 static void RequestUserAttentionForWindow(
89 AppWindow* app_window,
90 AppShimAttentionType attention_type);
85 91
86 // Called by AppControllerMac when Chrome hides. 92 // Called by AppControllerMac when Chrome hides.
87 static void OnChromeWillHide(); 93 static void OnChromeWillHide();
88 94
89 // AppShimHandler overrides: 95 // AppShimHandler overrides:
90 virtual void OnShimLaunch(Host* host, 96 virtual void OnShimLaunch(Host* host,
91 AppShimLaunchType launch_type, 97 AppShimLaunchType launch_type,
92 const std::vector<base::FilePath>& files) OVERRIDE; 98 const std::vector<base::FilePath>& files) OVERRIDE;
93 virtual void OnShimClose(Host* host) OVERRIDE; 99 virtual void OnShimClose(Host* host) OVERRIDE;
94 virtual void OnShimFocus(Host* host, 100 virtual void OnShimFocus(Host* host,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 content::NotificationRegistrar registrar_; 150 content::NotificationRegistrar registrar_;
145 151
146 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_; 152 base::WeakPtrFactory<ExtensionAppShimHandler> weak_factory_;
147 153
148 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler); 154 DISALLOW_COPY_AND_ASSIGN(ExtensionAppShimHandler);
149 }; 155 };
150 156
151 } // namespace apps 157 } // namespace apps
152 158
153 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_ 159 #endif // APPS_APP_SHIM_EXTENSION_APP_SHIM_HANDLER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698