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

Side by Side Diff: ios/public/provider/chrome/browser/ui/default_ios_web_view_factory.mm

Issue 2653233002: [ObjC ARC] Converts ios/public/provider/chrome/browser/ui:ui to ARC. (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 unified diff | Download patch
« no previous file with comments | « ios/public/provider/chrome/browser/ui/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/public/provider/chrome/browser/ui/default_ios_web_view_factory.h" 5 #import "ios/public/provider/chrome/browser/ui/default_ios_web_view_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 namespace { 13 namespace {
10 Class g_registered_factory_class = nil; 14 Class g_registered_factory_class = nil;
11 } // namespace 15 } // namespace
12 16
13 @implementation DefaultIOSWebViewFactory 17 @implementation DefaultIOSWebViewFactory
14 18
15 + (void)registerWebViewFactory:(Class)webViewFactoryClass { 19 + (void)registerWebViewFactory:(Class)webViewFactoryClass {
16 DCHECK([webViewFactoryClass conformsToProtocol:@protocol(IOSWebViewFactory)]); 20 DCHECK([webViewFactoryClass conformsToProtocol:@protocol(IOSWebViewFactory)]);
17 g_registered_factory_class = webViewFactoryClass; 21 g_registered_factory_class = webViewFactoryClass;
18 } 22 }
19 23
20 #pragma mark - 24 #pragma mark -
21 #pragma mark IOSWebViewFactory 25 #pragma mark IOSWebViewFactory
22 26
23 + (UIWebView*) 27 + (UIWebView*)
24 newExternalWebView:(IOSWebViewFactoryExternalService)externalService { 28 newExternalWebView:(IOSWebViewFactoryExternalService)externalService {
25 if (g_registered_factory_class) 29 if (g_registered_factory_class)
26 return [g_registered_factory_class newExternalWebView:externalService]; 30 return [g_registered_factory_class newExternalWebView:externalService];
27 return [[UIWebView alloc] init]; 31 return [[UIWebView alloc] init];
28 } 32 }
29 33
30 @end 34 @end
OLDNEW
« no previous file with comments | « ios/public/provider/chrome/browser/ui/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698