Skip to content

Commit

Permalink
Converts top-level ios/web files, interstitials and navigation direct…
Browse files Browse the repository at this point in the history
…ories to ARC.

Removes property_releaser usage. Includes results of ARCMigrate run.

BUG=624365
TEST=None

Review-Url: https://codereview.chromium.org/2202623002
Cr-Commit-Position: refs/heads/master@{#413717}
  • Loading branch information
stkhapugin authored and Commit bot committed Aug 23, 2016
1 parent 60cd6e8 commit eb706fb
Show file tree
Hide file tree
Showing 17 changed files with 159 additions and 82 deletions.
51 changes: 43 additions & 8 deletions ios/web/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import("//ios/web/js_compile.gni")
import("//testing/test.gni")
import("//tools/grit/grit_rule.gni")

source_set("web") {
source_set("web_arc") {
deps = [
":core",
":js_resources",
Expand Down Expand Up @@ -62,6 +62,46 @@ source_set("web") {
"navigation/nscoder_util.mm",
"navigation/time_smoother.cc",
"navigation/time_smoother.h",
"string_util.cc",
"url_scheme_util.mm",
"url_util.cc",
"web_kit_constants.cc",
"web_thread_impl.cc",
"web_thread_impl.h",
"web_view_creation_util.mm",
]

libs = [ "WebKit.framework" ]

configs += [ "//build/config/compiler:enable_arc" ]
}

source_set("web") {
deps = [
":core",
":js_resources",
":resources",
":user_agent",
"//base",
"//components/url_formatter",
"//ios/net",
"//ios/third_party/blink:html_tokenizer",
"//mojo/public/cpp/system",
"//mojo/public/js",
"//net",
"//services/shell/public/cpp",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry:geometry",
"//ui/resources",
"//url",
]

public_deps = [
":web_arc",
]

sources = [
"net/cert_host_pair.cc",
"net/cert_host_pair.h",
"net/cert_policy.cc",
Expand Down Expand Up @@ -169,10 +209,6 @@ source_set("web") {
"public/webui/web_ui_ios_controller_factory.h",
"public/webui/web_ui_ios_message_handler.cc",
"public/webui/web_ui_ios_message_handler.h",
"string_util.cc",
"url_scheme_util.mm",
"url_util.cc",
"web_kit_constants.cc",
"web_state/blocked_popup_info.h",
"web_state/blocked_popup_info.mm",
"web_state/context_menu_params.mm",
Expand Down Expand Up @@ -234,9 +270,6 @@ source_set("web") {
"web_state/web_view_internal_creation_util.mm",
"web_state/wk_web_view_security_util.h",
"web_state/wk_web_view_security_util.mm",
"web_thread_impl.cc",
"web_thread_impl.h",
"web_view_creation_util.mm",
"webui/crw_web_ui_manager.h",
"webui/crw_web_ui_manager.mm",
"webui/crw_web_ui_page_builder.h",
Expand Down Expand Up @@ -265,6 +298,8 @@ source_set("web") {
]

libs = [ "WebKit.framework" ]

allow_circular_includes_from = [ ":web_arc" ]
}

source_set("core") {
Expand Down
4 changes: 4 additions & 0 deletions ios/web/active_state_manager_impl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include "ios/web/public/browser_state.h"
#include "ios/web/public/web_thread.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace web {

namespace {
Expand Down
4 changes: 4 additions & 0 deletions ios/web/alloc_with_zone_interceptor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

#include "base/logging.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace web {

void AddAllocWithZoneMethod(Class target, id (^impl_block)(Class, NSZone*)) {
Expand Down
4 changes: 4 additions & 0 deletions ios/web/browser_state.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#include "ios/web/public/web_thread.h"
#include "ios/web/webui/url_data_manager_ios_backend.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace web {
namespace {
// Private key used for safe conversion of base::SupportsUserData to
Expand Down
4 changes: 4 additions & 0 deletions ios/web/browser_url_rewriter_impl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include "ios/web/public/web_client.h"
#include "url/gurl.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace web {

namespace {
Expand Down
4 changes: 4 additions & 0 deletions ios/web/interstitials/html_web_interstitial_impl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#import "net/base/mac/url_conversions.h"
#include "ui/gfx/geometry/size.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

// The delegate of the web view that is used to display the HTML content.
// It intercepts JavaScript-triggered commands and forwards them
// to the interstitial.
Expand Down
4 changes: 4 additions & 0 deletions ios/web/interstitials/native_web_interstitial_impl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include "ios/web/web_state/web_state_impl.h"
#include "ui/gfx/geometry/size.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace web {

// static
Expand Down
4 changes: 4 additions & 0 deletions ios/web/interstitials/web_interstitial_impl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#import "ios/web/public/navigation_manager.h"
#include "ios/web/web_state/web_state_impl.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

namespace web {

// static
Expand Down
4 changes: 4 additions & 0 deletions ios/web/navigation/crw_session_certificate_policy_manager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#include "net/base/hash_value.h"
#include "net/cert/x509_certificate.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

// Break if we detect that CertStatus values changed, because we persist them on
// disk and thus require them to be consistent.
static_assert(net::CERT_STATUS_ALL_ERRORS == 0xFF00FFFF,
Expand Down
20 changes: 10 additions & 10 deletions ios/web/navigation/crw_session_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,33 @@ struct SSLStatus;
// NavigationManager.
@interface CRWSessionController : NSObject<NSCoding, NSCopying>

@property(nonatomic, readonly, retain) NSString* tabId;
@property(nonatomic, readonly, copy) NSString* tabId;
@property(nonatomic, readonly, assign) NSInteger currentNavigationIndex;
@property(nonatomic, readonly, assign) NSInteger previousNavigationIndex;
@property(nonatomic, readonly, retain) NSArray* entries;
@property(nonatomic, readonly, strong) NSArray* entries;
@property(nonatomic, copy) NSString* windowName;
// Indicates whether the page was opened by DOM (e.g. with |window.open|
// JavaScript call or by clicking a link with |_blank| target).
@property(nonatomic, readonly, getter=isOpenedByDOM) BOOL openedByDOM;
@property(nonatomic, readonly, retain)
@property(nonatomic, readonly, strong)
CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager;
// Returns the current entry in the session list, or the pending entry if there
// is a navigation in progress.
@property(nonatomic, readonly) CRWSessionEntry* currentEntry;
@property(nonatomic, readonly, strong) CRWSessionEntry* currentEntry;
// Returns the entry that should be displayed to users (e.g., in the omnibox).
@property(nonatomic, readonly) CRWSessionEntry* visibleEntry;
@property(nonatomic, readonly, strong) CRWSessionEntry* visibleEntry;
// Returns the pending entry, if any.
@property(nonatomic, readonly) CRWSessionEntry* pendingEntry;
@property(nonatomic, readonly, strong) CRWSessionEntry* pendingEntry;
// Returns the transient entry, if any.
@property(nonatomic, readonly) CRWSessionEntry* transientEntry;
@property(nonatomic, readonly, strong) CRWSessionEntry* transientEntry;
// Returns the last committed entry.
@property(nonatomic, readonly) CRWSessionEntry* lastCommittedEntry;
@property(nonatomic, readonly, strong) CRWSessionEntry* lastCommittedEntry;
// Returns the previous entry in the session list, or nil if there isn't any.
@property(nonatomic, readonly) CRWSessionEntry* previousEntry;
@property(nonatomic, readonly, strong) CRWSessionEntry* previousEntry;
@property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp;
@property(nonatomic, readonly, copy) NSString* openerId;
@property(nonatomic, readonly, assign) NSInteger openerNavigationIndex;
@property(nonatomic, retain) XCallbackParameters* xCallbackParameters;
@property(nonatomic, strong) XCallbackParameters* xCallbackParameters;

// CRWSessionController doesn't have public constructors. New
// CRWSessionControllers are created by deserialization, or via a
Expand Down
Loading

0 comments on commit eb706fb

Please sign in to comment.