Commit 4f4ddb30 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Remove categories on CWVWebViewConfiguration,CWVPreferences,CWVWebView

It is no longer necessary to split the interface like this anymore
because we no longer use build flags to control public headers.

Change-Id: I1214850f799f8f73dec96103a264c8f2440ab6ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154026
Commit-Queue: John Wu <jzw@chromium.org>
Reviewed-by: default avatarHiroshi Ichikawa <ichikawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759913}
parent 8df286c2
......@@ -59,7 +59,6 @@ ios_web_view_public_headers = [
"public/cwv_navigation_type.h",
"public/cwv_password.h",
"public/cwv_preferences.h",
"public/cwv_preferences_autofill.h",
"public/cwv_preview_element_info.h",
"public/cwv_script_command.h",
"public/cwv_scroll_view.h",
......@@ -77,10 +76,7 @@ ios_web_view_public_headers = [
"public/cwv_user_content_controller.h",
"public/cwv_user_script.h",
"public/cwv_web_view.h",
"public/cwv_web_view_autofill.h",
"public/cwv_web_view_configuration.h",
"public/cwv_web_view_configuration_autofill.h",
"public/cwv_web_view_configuration_sync.h",
]
source_set("web_view_sources") {
......
......@@ -15,7 +15,6 @@
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
#include "components/translate/core/browser/translate_pref_names.h"
#import "ios/web_view/public/cwv_preferences_autofill.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
......
......@@ -141,7 +141,6 @@ WEB_STATE_USER_DATA_KEY_IMPL(WebViewHolder)
@property(nonatomic, readwrite) NSURL* visibleURL;
@property(nonatomic, readwrite) NSString* visibleLocationString;
@property(nonatomic, readwrite) CWVSSLStatus* visibleSSLStatus;
@property(nonatomic, readonly) CWVAutofillController* autofillController;
// Updates the availability of the back/forward navigation properties exposed
// through |canGoBack| and |canGoForward|, and also updates |backForwardList|.
......
......@@ -36,19 +36,6 @@
NSHashTable* _webViews;
}
// This web view configuration's autofill data manager.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable)
CWVAutofillDataManager* autofillDataManager;
// This web view configuration's sync controller.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable) CWVSyncController* syncController;
// Initializes configuration with the specified browser state mode.
- (instancetype)initWithBrowserState:
(std::unique_ptr<ios_web_view::WebViewBrowserState>)browserState;
@end
@implementation CWVWebViewConfiguration
......
......@@ -22,6 +22,27 @@ CWV_EXPORT
@property(nonatomic, assign, getter=isTranslationEnabled)
BOOL translationEnabled;
// Whether or not profile autofill is turned on. Defaults to |YES|.
// If enabled, contents of submitted profiles may be saved and offered as a
// suggestion in either the same or similar forms.
@property(nonatomic, assign, getter=isProfileAutofillEnabled)
BOOL profileAutofillEnabled;
// Whether or not credit card autofill is turned on. Defaults to |YES|.
// If enabled, contents of submitted credit cards may be saved and offered as a
// suggestion in either the same or similar forms.
@property(nonatomic, assign, getter=isCreditCardAutofillEnabled)
BOOL creditCardAutofillEnabled;
// Whether or not CWVWebView allows saving passwords for autofill. Defaults to
// |YES|. When it is NO, it doesn't ask if you want to save passwords but will
// continue to fill passwords.
//
// TODO(crbug.com/905221): Preference should also control autofill behavior for
// the passwords.
@property(nonatomic, assign, getter=isPasswordAutofillEnabled)
BOOL passwordAutofillEnabled;
- (instancetype)init NS_UNAVAILABLE;
// Resets all translation settings back to default. In particular, this will
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_VIEW_PUBLIC_CWV_PREFERENCES_AUTOFILL_H_
#define IOS_WEB_VIEW_PUBLIC_CWV_PREFERENCES_AUTOFILL_H_
#import <Foundation/Foundation.h>
#import "cwv_preferences.h"
NS_ASSUME_NONNULL_BEGIN
@interface CWVPreferences (Autofill)
// Whether or not profile autofill is turned on. Defaults to |YES|.
// If enabled, contents of submitted profiles may be saved and offered as a
// suggestion in either the same or similar forms.
@property(nonatomic, assign, getter=isProfileAutofillEnabled)
BOOL profileAutofillEnabled;
// Whether or not credit card autofill is turned on. Defaults to |YES|.
// If enabled, contents of submitted credit cards may be saved and offered as a
// suggestion in either the same or similar forms.
@property(nonatomic, assign, getter=isCreditCardAutofillEnabled)
BOOL creditCardAutofillEnabled;
// Whether or not CWVWebView allows saving passwords for autofill. Defaults to
// |YES|. When it is NO, it doesn't ask if you want to save passwords but will
// continue to fill passwords.
//
// TODO(crbug.com/905221): Preference should also control autofill behavior for
// the passwords.
@property(nonatomic, assign, getter=isPasswordAutofillEnabled)
BOOL passwordAutofillEnabled;
@end
NS_ASSUME_NONNULL_END
#endif // IOS_WEB_VIEW_PUBLIC_CWV_PREFERENCES_AUTOFILL_H_
......@@ -12,6 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
@class CWVAutofillController;
@class CWVBackForwardList;
@class CWVBackForwardListItem;
@class CWVScriptCommand;
......@@ -116,6 +117,9 @@ CWV_EXPORT
// back-forward list navigations.
@property(nonatomic) BOOL allowsBackForwardNavigationGestures;
// The web view's autofill controller.
@property(nonatomic, readonly) CWVAutofillController* autofillController;
// An equivalent of
// https://developer.apple.com/documentation/webkit/wkwebview/1414977-backforwardlist
@property(nonatomic, readonly, nonnull) CWVBackForwardList* backForwardList;
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_AUTOFILL_H_
#define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_AUTOFILL_H_
#import "cwv_web_view.h"
NS_ASSUME_NONNULL_BEGIN
@class CWVAutofillController;
@interface CWVWebView (Autofill)
// The web view's autofill controller.
@property(nonatomic, readonly) CWVAutofillController* autofillController;
@end
NS_ASSUME_NONNULL_END
#endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_AUTOFILL_H_
......@@ -11,7 +11,9 @@
NS_ASSUME_NONNULL_BEGIN
@class CWVAutofillDataManager;
@class CWVPreferences;
@class CWVSyncController;
@class CWVUserContentController;
@class CWVWebsiteDataStore;
......@@ -34,6 +36,15 @@ CWV_EXPORT
// configuration.
@property(nonatomic, readonly) CWVUserContentController* userContentController;
// This web view configuration's sync controller.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable) CWVSyncController* syncController;
// This web view configuration's autofill data manager.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable)
CWVAutofillDataManager* autofillDataManager;
// YES if it is a configuration with persistent data store which stores all data
// on disk.
@property(nonatomic, readonly, getter=isPersistent) BOOL persistent;
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_AUTOFILL_H_
#define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_AUTOFILL_H_
#import <Foundation/Foundation.h>
#import "cwv_web_view_configuration.h"
NS_ASSUME_NONNULL_BEGIN
@class CWVAutofillDataManager;
@interface CWVWebViewConfiguration (Autofill)
// This web view configuration's autofill data manager.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable)
CWVAutofillDataManager* autofillDataManager;
@end
NS_ASSUME_NONNULL_END
#endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_AUTOFILL_H_
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_SIGNIN_H_
#define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_SIGNIN_H_
#import <Foundation/Foundation.h>
#import "cwv_web_view_configuration.h"
NS_ASSUME_NONNULL_BEGIN
@class CWVAuthenticationController;
@interface CWVWebViewConfiguration (Signin)
// This web view configuration's authentication controller.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable)
CWVAuthenticationController* authenticationController;
@end
NS_ASSUME_NONNULL_END
#endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_SIGNIN_H_
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_SYNC_H_
#define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_SYNC_H_
#import <Foundation/Foundation.h>
#import "cwv_web_view_configuration.h"
NS_ASSUME_NONNULL_BEGIN
@class CWVSyncController;
@interface CWVWebViewConfiguration (Sync)
// This web view configuration's sync controller.
// nil if CWVWebViewConfiguration is created with +incognitoConfiguration.
@property(nonatomic, readonly, nullable) CWVSyncController* syncController;
@end
NS_ASSUME_NONNULL_END
#endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_CONFIGURATION_SYNC_H_
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