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

Side by Side Diff: ios/chrome/browser/ui/static_content/static_html_native_content.mm

Issue 2616633003: Fix crash in StaticHTMLNativeContent when deallocating WKWebView on iOS9 (Closed)
Patch Set: move setDelegate Created 3 years, 11 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/chrome/browser/ui/reading_list/offline_page_native_content.mm ('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/chrome/browser/ui/static_content/static_html_native_content.h" 5 #import "ios/chrome/browser/ui/static_content/static_html_native_content.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h" 9 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h"
10 #include "ios/chrome/browser/ui/static_content/static_html_view_controller.h" 10 #include "ios/chrome/browser/ui/static_content/static_html_view_controller.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 rendererInitiated:rendererInitiated]; 78 rendererInitiated:rendererInitiated];
79 } 79 }
80 80
81 - (OverscrollActionsController*)overscrollActionsController { 81 - (OverscrollActionsController*)overscrollActionsController {
82 return _overscrollActionsController.get(); 82 return _overscrollActionsController.get();
83 } 83 }
84 84
85 - (void)setOverscrollActionsController: 85 - (void)setOverscrollActionsController:
86 (OverscrollActionsController*)controller { 86 (OverscrollActionsController*)controller {
87 _overscrollActionsController.reset([controller retain]); 87 _overscrollActionsController.reset([controller retain]);
88 [[self scrollView] setDelegate:controller];
88 } 89 }
89 90
90 #pragma mark - 91 #pragma mark -
91 #pragma mark CRWNativeContent implementation 92 #pragma mark CRWNativeContent implementation
92 93
94 - (void)willBeDismissed {
95 [_overscrollActionsController invalidate];
96 [[self scrollView] setDelegate:nil];
97 }
98
93 - (void)close { 99 - (void)close {
94 [_overscrollActionsController invalidate]; 100 [self willBeDismissed];
Eugene But (OOO till 7-30) 2017/01/04 17:52:18 According to |willBeDismissed| comments this is ca
95 } 101 }
96 102
97 - (void)willUpdateSnapshot { 103 - (void)willUpdateSnapshot {
98 [_overscrollActionsController clear]; 104 [_overscrollActionsController clear];
99 } 105 }
100 106
101 - (const GURL&)url { 107 - (const GURL&)url {
102 return _URL; 108 return _URL;
103 } 109 }
104 110
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!_webUsageEnabled) { 148 if (!_webUsageEnabled) {
143 _staticHTMLViewController.reset(); 149 _staticHTMLViewController.reset();
144 } 150 }
145 } 151 }
146 152
147 - (UIScrollView*)scrollView { 153 - (UIScrollView*)scrollView {
148 return [_staticHTMLViewController scrollView]; 154 return [_staticHTMLViewController scrollView];
149 } 155 }
150 156
151 @end 157 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/reading_list/offline_page_native_content.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698