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

Unified Diff: ios/web_view/public/cwv_html_element.h

Issue 2723433004: Add CWVUIDelegate with method to customize context menu. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ios/web_view/public/cwv_html_element.h
diff --git a/ios/web_view/public/cwv_html_element.h b/ios/web_view/public/cwv_html_element.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ebadc30facc58a329a62855d257a769a33a8c0e
--- /dev/null
+++ b/ios/web_view/public/cwv_html_element.h
@@ -0,0 +1,29 @@
+// Copyright 2017 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_HTML_ELEMENT_H_
+#define IOS_WEB_VIEW_PUBLIC_CWV_HTML_ELEMENT_H_
+
+#import <Foundation/Foundation.h>
+
+// Encapsulates information about HTML element. Used in
+// delegate methods.
+@interface CWVHTMLElement : NSObject
+
+- (nonnull instancetype)init NS_UNAVAILABLE;
+
+- (nonnull instancetype)initWithHyperlink:(nullable NSURL*)hyperlink
Eugene But (OOO till 7-30) 2017/02/27 16:34:06 Should this be a part of public API? Do WebView ne
michaeldo 2017/02/27 19:02:06 No. I agree, this should be internal api. Done
+ mediaSource:(nullable NSURL*)mediaSource
+ text:(nullable NSString*)text
+ NS_DESIGNATED_INITIALIZER;
+
+// |href| property of an HTML element.
+@property(nullable, copy, readonly) NSURL* hyperlink;
+// |src| property of an HTML element.
+@property(nullable, copy, readonly) NSURL* mediaSource;
+// |innerText| property of an HTML element.
+@property(nullable, copy, readonly) NSString* text;
+@end
+
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_HTML_ELEMENT_H_

Powered by Google App Engine
This is Rietveld 408576698