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

Unified Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 461303002: [Mac] Bounce app shims when app windows request attention. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index b32f23319bc25485cc26baaf6ae3e88643e5eab6..2c3701c98cabdcc174ac7a70d15ba91b8d47db2a 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -570,7 +570,7 @@ void NativeAppWindowCocoa::Show() {
if (is_hidden_with_app_) {
// If there is a shim to gently request attention, return here. Otherwise
// show the window as usual.
- if (apps::ExtensionAppShimHandler::RequestUserAttentionForWindow(
+ if (apps::ExtensionAppShimHandler::ActivateAndRequestUserAttentionForWindow(
app_window_)) {
return;
}
@@ -729,12 +729,10 @@ void NativeAppWindowCocoa::UpdateDraggableRegionViews() {
}
void NativeAppWindowCocoa::FlashFrame(bool flash) {
- if (flash) {
- attention_request_id_ = [NSApp requestUserAttention:NSInformationalRequest];
- } else {
- [NSApp cancelUserAttentionRequest:attention_request_id_];
- attention_request_id_ = 0;
- }
+ apps::ExtensionAppShimHandler::RequestUserAttentionForWindow(
+ app_window_,
+ flash ? apps::APP_SHIM_ATTENTION_CRITICAL
+ : apps::APP_SHIM_ATTENTION_CANCEL);
}
tapted 2014/08/13 03:37:08 is NativeAppWindowCocoa::attention_request_id_ unu
jackhou1 2014/08/13 05:53:46 Removed. I don't think we need to do anything in
bool NativeAppWindowCocoa::IsAlwaysOnTop() const {

Powered by Google App Engine
This is Rietveld 408576698