cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [4/4] ios commit: Make CDVLocalStorage use onReset
Date Fri, 15 Feb 2013 19:12:04 GMT
Updated Branches:
  refs/heads/master 45de64893 -> 96c587b99


Make CDVLocalStorage use onReset

instead of overriding the UIWebView delegate.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/8bfa7884
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8bfa7884
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8bfa7884

Branch: refs/heads/master
Commit: 8bfa7884fb96a6d13da21effa2941c0168cda396
Parents: 45de648
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Feb 14 20:24:34 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Feb 15 13:48:51 2013 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVLocalStorage.h |    2 +-
 CordovaLib/Classes/CDVLocalStorage.m |   35 +----------------------------
 2 files changed, 2 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8bfa7884/CordovaLib/Classes/CDVLocalStorage.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.h b/CordovaLib/Classes/CDVLocalStorage.h
index e5e3112..cc6613f 100644
--- a/CordovaLib/Classes/CDVLocalStorage.h
+++ b/CordovaLib/Classes/CDVLocalStorage.h
@@ -22,7 +22,7 @@
 #define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain"
 #define kCDVLocalStorageFileOperationError 1
 
-@interface CDVLocalStorage : CDVPlugin <UIWebViewDelegate>
+@interface CDVLocalStorage : CDVPlugin
 
 @property (nonatomic, readonly, strong) NSMutableArray* backupInfo;
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8bfa7884/CordovaLib/Classes/CDVLocalStorage.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.m b/CordovaLib/Classes/CDVLocalStorage.m
index 57b37ee..68175f1 100644
--- a/CordovaLib/Classes/CDVLocalStorage.m
+++ b/CordovaLib/Classes/CDVLocalStorage.m
@@ -38,11 +38,6 @@
     BOOL cloudBackup = [@"cloud" isEqualToString:self.commandDelegate.settings[@"BackupWebStorage"]];
 
     self.backupInfo = [[self class] createBackupInfoWithCloudBackup:cloudBackup];
-
-    // over-ride current webview delegate (for restore reasons)
-    UIWebView* theWebView = self.webView;
-    self.webviewDelegate = theWebView.delegate;
-    theWebView.delegate = self;
 }
 
 #pragma mark -
@@ -408,37 +403,9 @@
     [self onResignActive];
 }
 
-#pragma mark -
-#pragma mark UIWebviewDelegate implementation and forwarding
-
-- (void)webViewDidStartLoad:(UIWebView*)theWebView
+- (void)onReset
 {
     [self restore:nil];
-
-    return [self.webviewDelegate webViewDidStartLoad:theWebView];
-}
-
-- (void)webViewDidFinishLoad:(UIWebView*)theWebView
-{
-    return [self.webviewDelegate webViewDidFinishLoad:theWebView];
-}
-
-- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
-{
-    return [self.webviewDelegate webView:theWebView didFailLoadWithError:error];
-}
-
-- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType
-{
-    return [self.webviewDelegate webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
-}
-
-#pragma mark -
-#pragma mark Over-rides
-
-- (void)dealloc
-{
-    [[NSNotificationCenter defaultCenter] removeObserver:self];   // this will remove all
notification unless added using addObserverForName:object:queue:usingBlock:
 }
 
 @end


Mime
View raw message