| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/browser_view_controller.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 6 | 6 |
| 7 #import <AssetsLibrary/AssetsLibrary.h> | 7 #import <AssetsLibrary/AssetsLibrary.h> |
| 8 #import <MobileCoreServices/MobileCoreServices.h> | 8 #import <MobileCoreServices/MobileCoreServices.h> |
| 9 #import <PassKit/PassKit.h> | 9 #import <PassKit/PassKit.h> |
| 10 #import <Photos/Photos.h> | 10 #import <Photos/Photos.h> |
| 11 #import <QuartzCore/QuartzCore.h> | 11 #import <QuartzCore/QuartzCore.h> |
| 12 | 12 |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 #include <cmath> | 14 #include <cmath> |
| 15 #include <memory> | 15 #include <memory> |
| 16 | 16 |
| 17 #include "base/base64.h" | 17 #include "base/base64.h" |
| 18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/feature_list.h" |
| 19 #include "base/files/file_path.h" | 20 #include "base/files/file_path.h" |
| 20 #include "base/format_macros.h" | 21 #include "base/format_macros.h" |
| 21 #include "base/i18n/rtl.h" | 22 #include "base/i18n/rtl.h" |
| 22 #include "base/ios/block_types.h" | 23 #include "base/ios/block_types.h" |
| 23 #include "base/ios/ios_util.h" | 24 #include "base/ios/ios_util.h" |
| 24 #include "base/logging.h" | 25 #include "base/logging.h" |
| 25 #include "base/mac/bind_objc_block.h" | 26 #include "base/mac/bind_objc_block.h" |
| 26 #include "base/mac/bundle_locations.h" | 27 #include "base/mac/bundle_locations.h" |
| 27 #include "base/mac/foundation_util.h" | 28 #include "base/mac/foundation_util.h" |
| 28 #include "base/macros.h" | 29 #include "base/macros.h" |
| 29 #include "base/memory/ptr_util.h" | 30 #include "base/memory/ptr_util.h" |
| 30 #include "base/metrics/histogram_macros.h" | 31 #include "base/metrics/histogram_macros.h" |
| 31 #include "base/metrics/user_metrics.h" | 32 #include "base/metrics/user_metrics.h" |
| 32 #include "base/metrics/user_metrics_action.h" | 33 #include "base/metrics/user_metrics_action.h" |
| 33 #include "base/strings/sys_string_conversions.h" | 34 #include "base/strings/sys_string_conversions.h" |
| 34 #include "base/strings/utf_string_conversions.h" | 35 #include "base/strings/utf_string_conversions.h" |
| 35 #include "base/threading/sequenced_worker_pool.h" | 36 #include "base/threading/sequenced_worker_pool.h" |
| 36 #include "components/bookmarks/browser/base_bookmark_model_observer.h" | 37 #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
| 37 #include "components/bookmarks/browser/bookmark_model.h" | 38 #include "components/bookmarks/browser/bookmark_model.h" |
| 38 #include "components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h" | 39 #include "components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h" |
| 39 #include "components/infobars/core/infobar_manager.h" | 40 #include "components/infobars/core/infobar_manager.h" |
| 41 #include "components/payments/core/features.h" |
| 40 #include "components/prefs/pref_service.h" | 42 #include "components/prefs/pref_service.h" |
| 41 #include "components/reading_list/core/reading_list_model.h" | 43 #include "components/reading_list/core/reading_list_model.h" |
| 42 #include "components/search_engines/search_engines_pref_names.h" | 44 #include "components/search_engines/search_engines_pref_names.h" |
| 43 #include "components/search_engines/template_url_service.h" | 45 #include "components/search_engines/template_url_service.h" |
| 44 #include "components/sessions/core/tab_restore_service_helper.h" | 46 #include "components/sessions/core/tab_restore_service_helper.h" |
| 45 #include "components/strings/grit/components_strings.h" | 47 #include "components/strings/grit/components_strings.h" |
| 46 #include "components/toolbar/toolbar_model_impl.h" | 48 #include "components/toolbar/toolbar_model_impl.h" |
| 47 #include "ios/chrome/app/tests_hook.h" | 49 #include "ios/chrome/app/tests_hook.h" |
| 48 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" | 50 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" |
| 49 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 51 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| (...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1828 _contextualSearchPanel = [self createPanelView]; | 1830 _contextualSearchPanel = [self createPanelView]; |
| 1829 [self.view insertSubview:_contextualSearchPanel | 1831 [self.view insertSubview:_contextualSearchPanel |
| 1830 aboveSubview:[_toolbarController view]]; | 1832 aboveSubview:[_toolbarController view]]; |
| 1831 _contextualSearchController = | 1833 _contextualSearchController = |
| 1832 [[ContextualSearchController alloc] initWithBrowserState:_browserState | 1834 [[ContextualSearchController alloc] initWithBrowserState:_browserState |
| 1833 delegate:self]; | 1835 delegate:self]; |
| 1834 [_contextualSearchController setPanel:_contextualSearchPanel]; | 1836 [_contextualSearchController setPanel:_contextualSearchPanel]; |
| 1835 [_contextualSearchController setTab:[_model currentTab]]; | 1837 [_contextualSearchController setTab:[_model currentTab]]; |
| 1836 } | 1838 } |
| 1837 | 1839 |
| 1838 if (experimental_flags::IsPaymentRequestEnabled()) { | 1840 if (base::FeatureList::IsEnabled(payments::features::kWebPayments)) { |
| 1839 _paymentRequestManager = [[PaymentRequestManager alloc] | 1841 _paymentRequestManager = [[PaymentRequestManager alloc] |
| 1840 initWithBaseViewController:self | 1842 initWithBaseViewController:self |
| 1841 browserState:_browserState]; | 1843 browserState:_browserState]; |
| 1842 [_paymentRequestManager setToolbarModel:_toolbarModelIOS.get()]; | 1844 [_paymentRequestManager setToolbarModel:_toolbarModelIOS.get()]; |
| 1843 [_paymentRequestManager setWebState:[_model currentTab].webState]; | 1845 [_paymentRequestManager setWebState:[_model currentTab].webState]; |
| 1844 } | 1846 } |
| 1845 } | 1847 } |
| 1846 | 1848 |
| 1847 // Set the frame for the various views. View must be loaded. | 1849 // Set the frame for the various views. View must be loaded. |
| 1848 - (void)setUpViewLayout { | 1850 - (void)setUpViewLayout { |
| (...skipping 3379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5228 | 5230 |
| 5229 - (UIView*)voiceSearchButton { | 5231 - (UIView*)voiceSearchButton { |
| 5230 return _voiceSearchButton; | 5232 return _voiceSearchButton; |
| 5231 } | 5233 } |
| 5232 | 5234 |
| 5233 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5235 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
| 5234 return [self currentLogoAnimationControllerOwner]; | 5236 return [self currentLogoAnimationControllerOwner]; |
| 5235 } | 5237 } |
| 5236 | 5238 |
| 5237 @end | 5239 @end |
| OLD | NEW |