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

Side by Side Diff: ios/chrome/browser/ui/tools_menu/tools_menu_configuration.mm

Issue 2714813002: [iOS] Add Request Mobile Site cell to tools menu (Closed)
Patch Set: Fix unit test Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ui/tools_menu/tools_menu_context.h" 5 #import "ios/chrome/browser/ui/tools_menu/tools_menu_configuration.h"
6 6
7 #import "base/ios/weak_nsobject.h" 7 #import "base/ios/weak_nsobject.h"
8 #import "base/logging.h" 8 #import "base/logging.h"
9 #import "ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.h" 9 #import "ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.h"
10 #include "ios/web/public/user_agent.h"
10 11
11 @implementation ToolsMenuContext { 12 @implementation ToolsMenuConfiguration {
12 base::WeakNSObject<UIView> _displayView; 13 base::WeakNSObject<UIView> _displayView;
13 base::WeakNSObject<UIButton> _toolsMenuButton; 14 base::WeakNSObject<UIButton> _toolsMenuButton;
14 base::WeakNSObject<ReadingListMenuNotifier> _readingListMenuNotifier; 15 base::WeakNSObject<ReadingListMenuNotifier> _readingListMenuNotifier;
15 } 16 }
16 17
17 @synthesize inTabSwitcher = _inTabSwitcher; 18 @synthesize inTabSwitcher = _inTabSwitcher;
18 @synthesize noOpenedTabs = _noOpenedTabs; 19 @synthesize noOpenedTabs = _noOpenedTabs;
19 @synthesize inIncognito = _inIncognito; 20 @synthesize inIncognito = _inIncognito;
21 @synthesize userAgentType = _userAgentType;
20 22
21 - (instancetype)initWithDisplayView:(UIView*)displayView { 23 - (instancetype)initWithDisplayView:(UIView*)displayView {
22 if (self = [super init]) { 24 if (self = [super init]) {
25 _userAgentType = web::UserAgentType::NONE;
23 _displayView.reset(displayView); 26 _displayView.reset(displayView);
24 _readingListMenuNotifier.reset(); 27 _readingListMenuNotifier.reset();
25 } 28 }
26 return self; 29 return self;
27 } 30 }
28 31
29 - (instancetype)init { 32 - (instancetype)init {
30 NOTREACHED(); 33 NOTREACHED();
31 return nil; 34 return nil;
32 } 35 }
(...skipping 27 matching lines...) Expand all
60 - (void)setReadingListMenuNotifier: 63 - (void)setReadingListMenuNotifier:
61 (ReadingListMenuNotifier*)readingListMenuNotifier { 64 (ReadingListMenuNotifier*)readingListMenuNotifier {
62 _readingListMenuNotifier.reset(readingListMenuNotifier); 65 _readingListMenuNotifier.reset(readingListMenuNotifier);
63 } 66 }
64 67
65 - (ReadingListMenuNotifier*)readingListMenuNotifier { 68 - (ReadingListMenuNotifier*)readingListMenuNotifier {
66 return _readingListMenuNotifier; 69 return _readingListMenuNotifier;
67 } 70 }
68 71
69 @end 72 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698