| 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/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 Loading... |
| 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 [[self scrollView] setDelegate:nil]; |
| 96 } |
| 97 |
| 93 - (void)close { | 98 - (void)close { |
| 94 [_overscrollActionsController invalidate]; | 99 [_overscrollActionsController invalidate]; |
| 95 } | 100 } |
| 96 | 101 |
| 97 - (void)willUpdateSnapshot { | 102 - (void)willUpdateSnapshot { |
| 98 [_overscrollActionsController clear]; | 103 [_overscrollActionsController clear]; |
| 99 } | 104 } |
| 100 | 105 |
| 101 - (const GURL&)url { | 106 - (const GURL&)url { |
| 102 return _URL; | 107 return _URL; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 if (!_webUsageEnabled) { | 147 if (!_webUsageEnabled) { |
| 143 _staticHTMLViewController.reset(); | 148 _staticHTMLViewController.reset(); |
| 144 } | 149 } |
| 145 } | 150 } |
| 146 | 151 |
| 147 - (UIScrollView*)scrollView { | 152 - (UIScrollView*)scrollView { |
| 148 return [_staticHTMLViewController scrollView]; | 153 return [_staticHTMLViewController scrollView]; |
| 149 } | 154 } |
| 150 | 155 |
| 151 @end | 156 @end |
| OLD | NEW |