Commit 9b6f44b0 authored by stkhapugin's avatar stkhapugin Committed by Commit bot

[ObjC ARC] Converts crw_web_controller to ARC.

Notable changes:
* crw_web_controller.mm used to have a dictionary storing selectors just
for keeping the KVO code clean. ARC cannot call a selector from a string
like this, because it cannot guarantee correct memory management in
this case. So it was replaced with an array of observed key paths to
keep some of the code cleanness, while the KVO callback has a huge
switch.

BUG=624365
TEST=None

Review-Url: https://codereview.chromium.org/2434853002
Cr-Commit-Position: refs/heads/master@{#430304}
parent b084e0a0
......@@ -201,6 +201,8 @@ source_set("web_arc") {
"web_state/ui/crw_swipe_recognizer_provider.h",
"web_state/ui/crw_touch_tracking_recognizer.h",
"web_state/ui/crw_touch_tracking_recognizer.mm",
"web_state/ui/crw_web_controller.h",
"web_state/ui/crw_web_controller.mm",
"web_thread_impl.cc",
"web_thread_impl.h",
"web_view_creation_util.mm",
......@@ -262,8 +264,6 @@ source_set("web") {
]
sources = [
"web_state/ui/crw_web_controller.h",
"web_state/ui/crw_web_controller.mm",
"web_state/ui/crw_web_controller_container_view.h",
"web_state/ui/crw_web_controller_container_view.mm",
"web_state/ui/crw_web_view_content_view.mm",
......
......@@ -72,31 +72,31 @@ class WebStateImpl;
// Defaults to NO; this should be enabled before attempting to access the view.
@property(nonatomic, assign) BOOL webUsageEnabled;
@property(nonatomic, assign) id<CRWWebDelegate> delegate;
@property(nonatomic, weak) id<CRWWebDelegate> delegate;
@property(nonatomic, weak) id<CRWWebUserInterfaceDelegate> UIDelegate;
@property(nonatomic, assign) id<CRWNativeContentProvider> nativeProvider;
@property(nonatomic, assign)
id<CRWSwipeRecognizerProvider> swipeRecognizerProvider;
@property(nonatomic, weak) id<CRWNativeContentProvider> nativeProvider;
@property(nonatomic, weak) id<CRWSwipeRecognizerProvider>
swipeRecognizerProvider;
@property(nonatomic, readonly) web::WebState* webState;
@property(nonatomic, readonly) web::WebStateImpl* webStateImpl;
// The container view used to display content. If the view has been purged due
// to low memory, this will recreate it.
@property(nonatomic, readonly) UIView* view;
@property(nonatomic, strong, readonly) UIView* view;
// The web view proxy associated with this controller.
@property(nonatomic, readonly) id<CRWWebViewProxy> webViewProxy;
@property(nonatomic, strong, readonly) id<CRWWebViewProxy> webViewProxy;
// The view that generates print data when printing. It is nil if printing
// is not supported.
@property(nonatomic, readonly) UIView* viewForPrinting;
@property(nonatomic, strong, readonly) UIView* viewForPrinting;
// Content view was reset due to low memory. Use placeholder overlay view on
// next creation.
@property(nonatomic, readwrite, assign) BOOL usePlaceholderOverlay;
@property(nonatomic, assign) BOOL usePlaceholderOverlay;
// Returns the current page loading phase.
@property(nonatomic, readonly) web::LoadPhase loadPhase;
@property(nonatomic, readonly, assign) web::LoadPhase loadPhase;
// The fraction of the page load that has completed as a number between 0.0
// (nothing loaded) and 1.0 (fully loaded).
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment