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

Unified Diff: ios/chrome/browser/ui/omnibox/page_info_view_controller.mm

Issue 2723903005: Send IDC_HIDE_PAGE_INFO to close PageInfoView when reloading the page. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/omnibox/page_info_view_controller.mm
diff --git a/ios/chrome/browser/ui/omnibox/page_info_view_controller.mm b/ios/chrome/browser/ui/omnibox/page_info_view_controller.mm
index e977b05e787d5a11c536b7c0ffb6325747d7e77e..fbb22ef2021b040e8d61bc9769e2aac4f0752d9d 100644
--- a/ios/chrome/browser/ui/omnibox/page_info_view_controller.mm
+++ b/ios/chrome/browser/ui/omnibox/page_info_view_controller.mm
@@ -183,6 +183,9 @@ void PageInfoModelBubbleBridge::OnPageInfoModelChanged() {
toSubviews:(NSMutableArray*)subviews
atOffset:(CGFloat)offset;
+// Sends the IDC_HIDE_PAGE_INFO command to hide the current popup.
+- (void)close;
+
@property(nonatomic, retain) UIView* containerView;
@property(nonatomic, retain) UIView* popupContainer;
@end
@@ -398,6 +401,10 @@ void PageInfoModelBubbleBridge::OnPageInfoModelChanged() {
[scrollView_ setContentSize:innerContainerView_.get().frame.size];
}
+- (void)close {
+ [containerView_ chromeExecuteCommand:containerView_];
+}
+
- (void)dismiss {
[self animatePageInfoViewOut];
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification,
@@ -478,7 +485,7 @@ void PageInfoModelBubbleBridge::OnPageInfoModelChanged() {
tag = IDC_RELOAD;
accessibilityID = @"Reload button";
[button addTarget:self
- action:@selector(dismiss)
+ action:@selector(close)
forControlEvents:UIControlEventTouchUpInside];
break;
};
@@ -529,7 +536,7 @@ void PageInfoModelBubbleBridge::OnPageInfoModelChanged() {
- (void)rootViewTapped:(UIGestureRecognizer*)sender {
CGPoint pt = [sender locationInView:containerView_];
if (!CGRectContainsPoint([popupContainer_ frame], pt)) {
- [containerView_ chromeExecuteCommand:containerView_];
+ [self close];
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698