| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/clean/chrome/browser/ui/tools/tools_mediator.h" |
| 6 |
| 7 #import "ios/clean/chrome/browser/ui/actions/settings_actions.h" |
| 8 #import "ios/clean/chrome/browser/ui/tools/tools_consumer.h" |
| 9 #import "ios/clean/chrome/browser/ui/tools/tools_menu_item.h" |
| 10 |
| 11 @implementation ToolsMediator |
| 12 |
| 13 @synthesize consumer = _consumer; |
| 14 |
| 15 - (void)setConsumer:(id<ToolsConsumer>)consumer { |
| 16 _consumer = consumer; |
| 17 |
| 18 // PLACEHOLDER: Temporary hardcoded consumer model. |
| 19 NSArray<ToolsMenuItem*>* menuItems = [[NSArray alloc] init]; |
| 20 menuItems = @[ |
| 21 [[ToolsMenuItem alloc] init], [[ToolsMenuItem alloc] init], |
| 22 [[ToolsMenuItem alloc] init], [[ToolsMenuItem alloc] init], |
| 23 [[ToolsMenuItem alloc] init], [[ToolsMenuItem alloc] init], |
| 24 [[ToolsMenuItem alloc] init], [[ToolsMenuItem alloc] init], |
| 25 [[ToolsMenuItem alloc] init], [[ToolsMenuItem alloc] init], |
| 26 [[ToolsMenuItem alloc] init] |
| 27 ]; |
| 28 |
| 29 menuItems[0].title = @"New Tab"; |
| 30 |
| 31 menuItems[1].title = @"New Incognito Tab"; |
| 32 |
| 33 menuItems[2].title = @"Bookmarks"; |
| 34 |
| 35 menuItems[3].title = @"Reading List"; |
| 36 |
| 37 menuItems[4].title = @"Recent Tabs"; |
| 38 |
| 39 menuItems[5].title = @"History"; |
| 40 |
| 41 menuItems[6].title = @"Report an Issue"; |
| 42 |
| 43 menuItems[7].title = @"Find in Pageā¦"; |
| 44 |
| 45 menuItems[8].title = @"Request Desktop Site"; |
| 46 |
| 47 menuItems[9].title = @"Settings"; |
| 48 menuItems[9].action = @selector(showSettings:); |
| 49 |
| 50 menuItems[10].title = @"Help"; |
| 51 |
| 52 [_consumer setToolsMenuItems:menuItems]; |
| 53 } |
| 54 |
| 55 @end |
| OLD | NEW |