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> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 #import "ios/chrome/browser/ui/browser_list_ios.h" | 90 #import "ios/chrome/browser/ui/browser_list_ios.h" |
91 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" | 91 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" |
92 #import "ios/chrome/browser/ui/chrome_web_view_factory.h" | 92 #import "ios/chrome/browser/ui/chrome_web_view_factory.h" |
93 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" | 93 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h" |
94 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 94 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
95 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 95 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
96 #import "ios/chrome/browser/ui/commands/open_url_command.h" | 96 #import "ios/chrome/browser/ui/commands/open_url_command.h" |
97 #import "ios/chrome/browser/ui/commands/reading_list_add_command.h" | 97 #import "ios/chrome/browser/ui/commands/reading_list_add_command.h" |
98 #import "ios/chrome/browser/ui/commands/show_mail_composer_command.h" | 98 #import "ios/chrome/browser/ui/commands/show_mail_composer_command.h" |
99 #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h" | 99 #import "ios/chrome/browser/ui/context_menu/context_menu_coordinator.h" |
100 #import "ios/chrome/browser/ui/context_menu/context_menu_delegate.h" | |
100 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" | 101 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" |
101 #import "ios/chrome/browser/ui/contextual_search/contextual_search_mask_view.h" | 102 #import "ios/chrome/browser/ui/contextual_search/contextual_search_mask_view.h" |
102 #import "ios/chrome/browser/ui/contextual_search/contextual_search_metrics.h" | 103 #import "ios/chrome/browser/ui/contextual_search/contextual_search_metrics.h" |
103 #import "ios/chrome/browser/ui/contextual_search/contextual_search_panel_protoco ls.h" | 104 #import "ios/chrome/browser/ui/contextual_search/contextual_search_panel_protoco ls.h" |
104 #import "ios/chrome/browser/ui/contextual_search/contextual_search_panel_view.h" | 105 #import "ios/chrome/browser/ui/contextual_search/contextual_search_panel_view.h" |
105 #import "ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_med iator.h" | 106 #import "ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_med iator.h" |
106 #import "ios/chrome/browser/ui/dialogs/dialog_presenter.h" | 107 #import "ios/chrome/browser/ui/dialogs/dialog_presenter.h" |
107 #import "ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h" | 108 #import "ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h" |
108 #import "ios/chrome/browser/ui/elements/activity_overlay_coordinator.h" | 109 #import "ios/chrome/browser/ui/elements/activity_overlay_coordinator.h" |
109 #import "ios/chrome/browser/ui/external_file_controller.h" | 110 #import "ios/chrome/browser/ui/external_file_controller.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 | 287 |
287 // Temporary key to use when storing native controllers vended to tabs before | 288 // Temporary key to use when storing native controllers vended to tabs before |
288 // they are added to the tab model. | 289 // they are added to the tab model. |
289 NSString* const kNativeControllerTemporaryKey = @"NativeControllerTemporaryKey"; | 290 NSString* const kNativeControllerTemporaryKey = @"NativeControllerTemporaryKey"; |
290 | 291 |
291 NSString* const kReadingListSnackbarCategory = @"ReadingListSnackbarCategory"; | 292 NSString* const kReadingListSnackbarCategory = @"ReadingListSnackbarCategory"; |
292 | 293 |
293 } // anonymous namespace | 294 } // anonymous namespace |
294 | 295 |
295 @interface BrowserViewController ()<AppRatingPromptDelegate, | 296 @interface BrowserViewController ()<AppRatingPromptDelegate, |
297 ContextMenuDelegate, | |
jif
2017/01/12 17:13:12
Does it make sense to use the CRWWebStateDelegate
Olivier
2017/01/13 10:20:25
I don't think so. CRWWebStateDelegate has other me
| |
296 ContextualSearchControllerDelegate, | 298 ContextualSearchControllerDelegate, |
297 ContextualSearchPanelMotionObserver, | 299 ContextualSearchPanelMotionObserver, |
298 CRWNativeContentProvider, | 300 CRWNativeContentProvider, |
299 CRWWebStateDelegate, | 301 CRWWebStateDelegate, |
300 DialogPresenterDelegate, | 302 DialogPresenterDelegate, |
301 FullScreenControllerDelegate, | 303 FullScreenControllerDelegate, |
302 KeyCommandsPlumbing, | 304 KeyCommandsPlumbing, |
303 MFMailComposeViewControllerDelegate, | 305 MFMailComposeViewControllerDelegate, |
304 NewTabPageControllerObserver, | 306 NewTabPageControllerObserver, |
305 OverscrollActionsControllerDelegate, | 307 OverscrollActionsControllerDelegate, |
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2930 browserState:_browserState | 2932 browserState:_browserState |
2931 url:GURL(kChromeUITermsURL)] autorelease]; | 2933 url:GURL(kChromeUITermsURL)] autorelease]; |
2932 [self setOverScrollActionControllerToStaticNativeContent: | 2934 [self setOverScrollActionControllerToStaticNativeContent: |
2933 staticNativeController]; | 2935 staticNativeController]; |
2934 nativeController = staticNativeController; | 2936 nativeController = staticNativeController; |
2935 } else if (url_host == kChromeUIOfflineHost) { | 2937 } else if (url_host == kChromeUIOfflineHost) { |
2936 StaticHtmlNativeContent* staticNativeController = | 2938 StaticHtmlNativeContent* staticNativeController = |
2937 [[[OfflinePageNativeContent alloc] initWithLoader:self | 2939 [[[OfflinePageNativeContent alloc] initWithLoader:self |
2938 browserState:_browserState | 2940 browserState:_browserState |
2939 webState:[self currentWebState] | 2941 webState:[self currentWebState] |
2940 URL:url] autorelease]; | 2942 URL:url |
2943 contextMenuDelegate:self] autorelease]; | |
2941 [self setOverScrollActionControllerToStaticNativeContent: | 2944 [self setOverScrollActionControllerToStaticNativeContent: |
2942 staticNativeController]; | 2945 staticNativeController]; |
2943 nativeController = staticNativeController; | 2946 nativeController = staticNativeController; |
2944 } else if (url_host == kChromeUIExternalFileHost) { | 2947 } else if (url_host == kChromeUIExternalFileHost) { |
2945 // Return an instance of the |ExternalFileController| only if the file is | 2948 // Return an instance of the |ExternalFileController| only if the file is |
2946 // still in the sandbox. | 2949 // still in the sandbox. |
2947 NSString* filePath = [ExternalFileController pathForExternalFileURL:url]; | 2950 NSString* filePath = [ExternalFileController pathForExternalFileURL:url]; |
2948 if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { | 2951 if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { |
2949 nativeController = [[[ExternalFileController alloc] | 2952 nativeController = [[[ExternalFileController alloc] |
2950 initWithURL:url | 2953 initWithURL:url |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5137 | 5140 |
5138 - (UIView*)voiceSearchButton { | 5141 - (UIView*)voiceSearchButton { |
5139 return _voiceSearchButton; | 5142 return _voiceSearchButton; |
5140 } | 5143 } |
5141 | 5144 |
5142 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5145 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
5143 return [self currentLogoAnimationControllerOwner]; | 5146 return [self currentLogoAnimationControllerOwner]; |
5144 } | 5147 } |
5145 | 5148 |
5146 @end | 5149 @end |
OLD | NEW |