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

Side by Side Diff: ios/chrome/browser/ui/ntp/google_landing_controller.mm

Issue 2606023003: Fix flaky NewTabPageTestCase.testOmnibox (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ntp/google_landing_controller.h" 5 #import "ios/chrome/browser/ui/ntp/google_landing_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 } 1667 }
1668 1668
1669 - (void)addBlacklistedURL:(const GURL&)url { 1669 - (void)addBlacklistedURL:(const GURL&)url {
1670 _most_visited_sites->AddOrRemoveBlacklistedUrl(url, true); 1670 _most_visited_sites->AddOrRemoveBlacklistedUrl(url, true);
1671 } 1671 }
1672 1672
1673 - (void)removeBlacklistedURL:(const GURL&)url { 1673 - (void)removeBlacklistedURL:(const GURL&)url {
1674 _most_visited_sites->AddOrRemoveBlacklistedUrl(url, false); 1674 _most_visited_sites->AddOrRemoveBlacklistedUrl(url, false);
1675 } 1675 }
1676 1676
1677 #pragma mark - GoogleLandingController (ExposedForTesting) methods.
1678
1677 - (BOOL)scrolledToTop { 1679 - (BOOL)scrolledToTop {
1678 return _scrolledToTop; 1680 return _scrolledToTop;
1679 } 1681 }
1680 1682
1683 - (BOOL)animateHeader {
1684 return _animateHeader;
1685 }
1686
1681 #pragma mark - OverscrollActionsControllerDelegate 1687 #pragma mark - OverscrollActionsControllerDelegate
1682 1688
1683 - (void)overscrollActionsController:(OverscrollActionsController*)controller 1689 - (void)overscrollActionsController:(OverscrollActionsController*)controller
1684 didTriggerAction:(ios_internal::OverscrollAction)action { 1690 didTriggerAction:(ios_internal::OverscrollAction)action {
1685 switch (action) { 1691 switch (action) {
1686 case ios_internal::OverscrollAction::NEW_TAB: { 1692 case ios_internal::OverscrollAction::NEW_TAB: {
1687 base::scoped_nsobject<GenericChromeCommand> command( 1693 base::scoped_nsobject<GenericChromeCommand> command(
1688 [[GenericChromeCommand alloc] initWithTag:IDC_NEW_TAB]); 1694 [[GenericChromeCommand alloc] initWithTag:IDC_NEW_TAB]);
1689 [[self view] chromeExecuteCommand:command]; 1695 [[self view] chromeExecuteCommand:command];
1690 } break; 1696 } break;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 if (!view) { 1741 if (!view) {
1736 return nil; 1742 return nil;
1737 } 1743 }
1738 if ([view isKindOfClass:aClass]) { 1744 if ([view isKindOfClass:aClass]) {
1739 return view; 1745 return view;
1740 } 1746 }
1741 return [self nearestAncestorOfView:[view superview] withClass:aClass]; 1747 return [self nearestAncestorOfView:[view superview] withClass:aClass];
1742 } 1748 }
1743 1749
1744 @end 1750 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698