Index: apps/app_shim/chrome_main_app_mode_mac.mm |
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm |
index 18b8f9e1cfdbca32b371e69ba850be1f2bc33587..ad92a736cad8bb300a9558d8b2c685622d9cd821 100644 |
--- a/apps/app_shim/chrome_main_app_mode_mac.mm |
+++ b/apps/app_shim/chrome_main_app_mode_mac.mm |
@@ -130,7 +130,7 @@ class AppShimController : public IPC::Listener { |
void OnHide(); |
// Requests user attention. |
- void OnRequestUserAttention(); |
+ void OnRequestUserAttention(apps::AppShimAttentionType attention_type); |
// Terminates the app shim process. |
void Close(); |
@@ -140,6 +140,7 @@ class AppShimController : public IPC::Listener { |
base::scoped_nsobject<AppShimDelegate> delegate_; |
bool launch_app_done_; |
bool ping_chrome_reply_received_; |
+ NSInteger attention_request_id_; |
DISALLOW_COPY_AND_ASSIGN(AppShimController); |
}; |
@@ -309,8 +310,22 @@ void AppShimController::OnHide() { |
[NSApp hide:nil]; |
} |
-void AppShimController::OnRequestUserAttention() { |
- [NSApp requestUserAttention:NSInformationalRequest]; |
+void AppShimController::OnRequestUserAttention( |
+ apps::AppShimAttentionType attention_type) { |
+ switch (attention_type) { |
+ case apps::APP_SHIM_ATTENTION_CANCEL: |
+ [NSApp cancelUserAttentionRequest:attention_request_id_]; |
+ attention_request_id_ = 0; |
+ break; |
+ case apps::APP_SHIM_ATTENTION_CRITICAL: |
+ attention_request_id_ = [NSApp requestUserAttention:NSCriticalRequest]; |
+ break; |
+ case apps::APP_SHIM_ATTENTION_INFORMATIONAL: |
+ attention_request_id_ = |
+ [NSApp requestUserAttention:NSInformationalRequest]; |
+ default: |
+ break; |
tapted
2014/08/13 03:37:08
maybe
case apps::APP_SHIM_ATTENTION_NUM_TYPES:
jackhou1
2014/08/13 05:53:45
Done.
|
+ } |
} |
void AppShimController::Close() { |