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

Side by Side Diff: ui/app_list/cocoa/app_list_window_controller.mm

Issue 98233002: Clear Search results in the Mac app launcher on close, rather than launch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elborate on comment. And a rebase if I'm unlucky Created 7 years 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 #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
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
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller.mm ('k') | ui/app_list/cocoa/app_list_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698