OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/web/web_state/ui/wk_web_view_configuration_provider.h" | 5 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 #import <WebKit/WebKit.h> | 8 #import <WebKit/WebKit.h> |
9 | 9 |
10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 setWebsiteDataStore:[WKWebsiteDataStore nonPersistentDataStore]]; | 64 setWebsiteDataStore:[WKWebsiteDataStore nonPersistentDataStore]]; |
65 } | 65 } |
66 // TODO(crbug.com/620878) Remove these guards after moving to iOS10 SDK. | 66 // TODO(crbug.com/620878) Remove these guards after moving to iOS10 SDK. |
67 #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 | 67 #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 |
68 if (base::ios::IsRunningOnIOS10OrLater()) { | 68 if (base::ios::IsRunningOnIOS10OrLater()) { |
69 [configuration_ setDataDetectorTypes:WKDataDetectorTypeCalendarEvent | | 69 [configuration_ setDataDetectorTypes:WKDataDetectorTypeCalendarEvent | |
70 WKDataDetectorTypeFlightNumber | | 70 WKDataDetectorTypeFlightNumber | |
71 WKDataDetectorTypePhoneNumber]; | 71 WKDataDetectorTypePhoneNumber]; |
72 } | 72 } |
73 #endif | 73 #endif |
74 if (base::ios::IsRunningOnIOS10OrLater()) { | |
75 [configuration_ setAllowsInlineMediaPlayback:YES]; | |
Eugene But (OOO till 7-30)
2016/08/19 21:32:11
If this does not break anything on iOS9 we should
| |
76 } | |
74 // setJavaScriptCanOpenWindowsAutomatically is required to support popups. | 77 // setJavaScriptCanOpenWindowsAutomatically is required to support popups. |
75 [[configuration_ preferences] setJavaScriptCanOpenWindowsAutomatically:YES]; | 78 [[configuration_ preferences] setJavaScriptCanOpenWindowsAutomatically:YES]; |
76 [[configuration_ userContentController] | 79 [[configuration_ userContentController] |
77 addUserScript:InternalGetEarlyPageScript()]; | 80 addUserScript:InternalGetEarlyPageScript()]; |
78 } | 81 } |
79 // Prevent callers from changing the internals of configuration. | 82 // Prevent callers from changing the internals of configuration. |
80 return [[configuration_ copy] autorelease]; | 83 return [[configuration_ copy] autorelease]; |
81 } | 84 } |
82 | 85 |
83 CRWWKScriptMessageRouter* | 86 CRWWKScriptMessageRouter* |
(...skipping 18 matching lines...) Expand all Loading... | |
102 configuration_.reset(); | 105 configuration_.reset(); |
103 router_.reset(); | 106 router_.reset(); |
104 // Make sure that no one retains configuration, router, processPool. | 107 // Make sure that no one retains configuration, router, processPool. |
105 DCHECK(!weak_configuration); | 108 DCHECK(!weak_configuration); |
106 DCHECK(!weak_router); | 109 DCHECK(!weak_router); |
107 // TODO(crbug.com/522672): Enable this DCHECK. | 110 // TODO(crbug.com/522672): Enable this DCHECK. |
108 // DCHECK(!weak_process_pool); | 111 // DCHECK(!weak_process_pool); |
109 } | 112 } |
110 | 113 |
111 } // namespace web | 114 } // namespace web |
OLD | NEW |