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

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

Issue 667923002: Standardize usage of virtual/override/final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
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/apps_search_results_controller.h" 5 #import "ui/app_list/cocoa/apps_search_results_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 menu_ready_(true) { 67 menu_ready_(true) {
68 set_title(base::ASCIIToUTF16(title)); 68 set_title(base::ASCIIToUTF16(title));
69 set_details(base::ASCIIToUTF16(details)); 69 set_details(base::ASCIIToUTF16(details));
70 menu_model_.AddItem(0, base::UTF8ToUTF16("Menu For: " + title)); 70 menu_model_.AddItem(0, base::UTF8ToUTF16("Menu For: " + title));
71 } 71 }
72 72
73 void SetMenuReadyForTesting(bool ready) { 73 void SetMenuReadyForTesting(bool ready) {
74 menu_ready_ = ready; 74 menu_ready_ = ready;
75 } 75 }
76 76
77 virtual ui::MenuModel* GetContextMenuModel() override { 77 ui::MenuModel* GetContextMenuModel() override {
78 if (!menu_ready_) 78 if (!menu_ready_)
79 return NULL; 79 return NULL;
80 80
81 return &menu_model_; 81 return &menu_model_;
82 } 82 }
83 83
84 private: 84 private:
85 ui::SimpleMenuModel menu_model_; 85 ui::SimpleMenuModel menu_model_;
86 bool menu_ready_; 86 bool menu_ready_;
87 87
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 ModelResultAt(0)->NotifyItemUninstalled(); 307 ModelResultAt(0)->NotifyItemUninstalled();
308 [delegate_ performSelector:@selector(quitMessageLoop) 308 [delegate_ performSelector:@selector(quitMessageLoop)
309 withObject:nil 309 withObject:nil
310 afterDelay:0]; 310 afterDelay:0];
311 message_loop.Run(); 311 message_loop.Run();
312 EXPECT_EQ(1, [delegate_ redoSearchCount]); 312 EXPECT_EQ(1, [delegate_ redoSearchCount]);
313 } 313 }
314 314
315 } // namespace test 315 } // namespace test
316 } // namespace app_list 316 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/apps_search_box_controller.mm ('k') | ui/app_list/cocoa/apps_search_results_model_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698