OLD | NEW |
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/clean/chrome/browser/ui/presenters/menu_presentation_controller.h" | 5 #import "ios/clean/chrome/browser/ui/transitions/presenters/menu_presentation_co
ntroller.h" |
6 | 6 |
7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h" | 9 #include "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h" |
10 #include "ios/clean/chrome/browser/ui/presenters/menu_presentation_delegate.h" | 10 #include "ios/clean/chrome/browser/ui/transitions/presenters/menu_presentation_d
elegate.h" |
11 | 11 |
12 #if !defined(__has_feature) || !__has_feature(objc_arc) | 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
13 #error "This file requires ARC support." | 13 #error "This file requires ARC support." |
14 #endif | 14 #endif |
15 | 15 |
16 @interface MenuPresentationController () | 16 @interface MenuPresentationController () |
17 @property(nonatomic, weak) id<MenuPresentationDelegate> presentationDelegate; | 17 @property(nonatomic, weak) id<MenuPresentationDelegate> presentationDelegate; |
18 @property(nonatomic, assign) CGRect presentationFrame; | 18 @property(nonatomic, assign) CGRect presentationFrame; |
19 @property(nonatomic, strong) UITapGestureRecognizer* dismissRecognizer; | 19 @property(nonatomic, strong) UITapGestureRecognizer* dismissRecognizer; |
20 @end | 20 @end |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 menuRect.origin.y = CGRectGetMinY(menuOriginRect); | 106 menuRect.origin.y = CGRectGetMinY(menuOriginRect); |
107 } else { | 107 } else { |
108 // Origin rect is closer to the bottom edge of |self.view| than to the top. | 108 // Origin rect is closer to the bottom edge of |self.view| than to the top. |
109 menuRect.origin.y = CGRectGetMaxY(menuOriginRect) - menuSize.height; | 109 menuRect.origin.y = CGRectGetMaxY(menuOriginRect) - menuSize.height; |
110 } | 110 } |
111 | 111 |
112 return menuRect; | 112 return menuRect; |
113 } | 113 } |
114 | 114 |
115 @end | 115 @end |
OLD | NEW |