OLD | NEW |
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 // On Mac, one can't make shortcuts with command-line arguments. Instead, we | 5 // On Mac, one can't make shortcuts with command-line arguments. Instead, we |
6 // produce small app bundles which locate the Chromium framework and load it, | 6 // produce small app bundles which locate the Chromium framework and load it, |
7 // passing the appropriate data. This is the entry point into the framework for | 7 // passing the appropriate data. This is the entry point into the framework for |
8 // those app bundles. | 8 // those app bundles. |
9 | 9 |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void OnUnhideWithoutActivation(); | 134 void OnUnhideWithoutActivation(); |
135 | 135 |
136 // Requests user attention. | 136 // Requests user attention. |
137 void OnRequestUserAttention(); | 137 void OnRequestUserAttention(); |
138 void OnSetUserAttention(apps::AppShimAttentionType attention_type); | 138 void OnSetUserAttention(apps::AppShimAttentionType attention_type); |
139 | 139 |
140 // Terminates the app shim process. | 140 // Terminates the app shim process. |
141 void Close(); | 141 void Close(); |
142 | 142 |
143 base::FilePath user_data_dir_; | 143 base::FilePath user_data_dir_; |
144 scoped_ptr<IPC::ChannelProxy> channel_; | 144 std::unique_ptr<IPC::ChannelProxy> channel_; |
145 base::scoped_nsobject<AppShimDelegate> delegate_; | 145 base::scoped_nsobject<AppShimDelegate> delegate_; |
146 bool launch_app_done_; | 146 bool launch_app_done_; |
147 bool ping_chrome_reply_received_; | 147 bool ping_chrome_reply_received_; |
148 NSInteger attention_request_id_; | 148 NSInteger attention_request_id_; |
149 | 149 |
150 DISALLOW_COPY_AND_ASSIGN(AppShimController); | 150 DISALLOW_COPY_AND_ASSIGN(AppShimController); |
151 }; | 151 }; |
152 | 152 |
153 AppShimController::AppShimController() | 153 AppShimController::AppShimController() |
154 : delegate_([[AppShimDelegate alloc] init]), | 154 : delegate_([[AppShimDelegate alloc] init]), |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 // minute. | 700 // minute. |
701 main_message_loop.PostTask( | 701 main_message_loop.PostTask( |
702 FROM_HERE, | 702 FROM_HERE, |
703 base::Bind(&AppShimController::Init, | 703 base::Bind(&AppShimController::Init, |
704 base::Unretained(&controller))); | 704 base::Unretained(&controller))); |
705 } | 705 } |
706 | 706 |
707 main_message_loop.Run(); | 707 main_message_loop.Run(); |
708 return 0; | 708 return 0; |
709 } | 709 } |
OLD | NEW |