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

Unified Diff: ios/chrome/browser/ui/tools_menu/tools_menu_context.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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/tools_menu/tools_menu_context.mm
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_context.mm b/ios/chrome/browser/ui/tools_menu/tools_menu_context.mm
deleted file mode 100644
index c1a6d048d6de32fa1dfd3e952259dac9e5c7a95b..0000000000000000000000000000000000000000
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_context.mm
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ios/chrome/browser/ui/tools_menu/tools_menu_context.h"
-
-#import "base/ios/weak_nsobject.h"
-#import "base/logging.h"
-#import "ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.h"
-
-@implementation ToolsMenuContext {
- base::WeakNSObject<UIView> _displayView;
- base::WeakNSObject<UIButton> _toolsMenuButton;
- base::WeakNSObject<ReadingListMenuNotifier> _readingListMenuNotifier;
-}
-
-@synthesize inTabSwitcher = _inTabSwitcher;
-@synthesize noOpenedTabs = _noOpenedTabs;
-@synthesize inIncognito = _inIncognito;
-
-- (instancetype)initWithDisplayView:(UIView*)displayView {
- if (self = [super init]) {
- _displayView.reset(displayView);
- _readingListMenuNotifier.reset();
- }
- return self;
-}
-
-- (instancetype)init {
- NOTREACHED();
- return nil;
-}
-
-- (UIEdgeInsets)toolsButtonInsets {
- return self.toolsMenuButton ? [self.toolsMenuButton imageEdgeInsets]
- : UIEdgeInsetsZero;
-}
-
-- (CGRect)sourceRect {
- // Set the origin for the tools popup to the horizontal center of the tools
- // menu button.
- return self.toolsMenuButton
- ? [self.displayView convertRect:self.toolsMenuButton.bounds
- fromView:self.toolsMenuButton]
- : CGRectZero;
-}
-
-- (void)setToolsMenuButton:(UIButton*)toolsMenuButton {
- _toolsMenuButton.reset(toolsMenuButton);
-}
-
-- (UIButton*)toolsMenuButton {
- return _toolsMenuButton;
-}
-
-- (UIView*)displayView {
- return _displayView;
-}
-
-- (void)setReadingListMenuNotifier:
- (ReadingListMenuNotifier*)readingListMenuNotifier {
- _readingListMenuNotifier.reset(readingListMenuNotifier);
-}
-
-- (ReadingListMenuNotifier*)readingListMenuNotifier {
- return _readingListMenuNotifier;
-}
-
-@end

Powered by Google App Engine
This is Rietveld 408576698