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 #import "ui/app_list/cocoa/app_list_window_controller.h" | 5 #import "ui/app_list/cocoa/app_list_window_controller.h" |
6 | 6 |
7 #include "ui/app_list/app_list_view_delegate.h" | 7 #include "ui/app_list/app_list_view_delegate.h" |
8 #import "ui/app_list/cocoa/app_list_view_controller.h" | 8 #import "ui/app_list/cocoa/app_list_view_controller.h" |
9 #import "ui/app_list/cocoa/apps_grid_controller.h" | 9 #import "ui/app_list/cocoa/apps_grid_controller.h" |
| 10 #import "ui/app_list/cocoa/apps_search_box_controller.h" |
10 #include "ui/base/cocoa/window_size_constants.h" | 11 #include "ui/base/cocoa/window_size_constants.h" |
11 | 12 |
12 @interface AppListWindow : NSWindow; | 13 @interface AppListWindow : NSWindow; |
13 @end | 14 @end |
14 | 15 |
15 @implementation AppListWindow | 16 @implementation AppListWindow |
16 | 17 |
17 // If we initialize a window with NSBorderlessWindowMask, it will not accept key | 18 // If we initialize a window with NSBorderlessWindowMask, it will not accept key |
18 // events (among other things) unless canBecomeKeyWindow is overridden. | 19 // events (among other things) unless canBecomeKeyWindow is overridden. |
19 - (BOOL)canBecomeKeyWindow { | 20 - (BOOL)canBecomeKeyWindow { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 53 |
53 - (AppListViewController*)appListViewController { | 54 - (AppListViewController*)appListViewController { |
54 return appListViewController_; | 55 return appListViewController_; |
55 } | 56 } |
56 | 57 |
57 - (void)windowDidResignMain:(NSNotification*)notification { | 58 - (void)windowDidResignMain:(NSNotification*)notification { |
58 if ([appListViewController_ delegate]) | 59 if ([appListViewController_ delegate]) |
59 [appListViewController_ delegate]->Dismiss(); | 60 [appListViewController_ delegate]->Dismiss(); |
60 } | 61 } |
61 | 62 |
| 63 - (void)windowWillClose:(NSNotification*)notification { |
| 64 [[appListViewController_ searchBoxController] clearSearch]; |
| 65 } |
| 66 |
62 @end | 67 @end |
OLD | NEW |