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

Unified Diff: ios/chrome/common/physical_web/physical_web_request.h

Issue 2023833002: [iOS] Upstream physical web classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about limiting the dependencies Created 4 years, 7 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/chrome/common/physical_web/physical_web_request.h
diff --git a/ios/chrome/common/physical_web/physical_web_request.h b/ios/chrome/common/physical_web/physical_web_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f3c7644adaf9de4257e6623f4177d5e812ec08d
--- /dev/null
+++ b/ios/chrome/common/physical_web/physical_web_request.h
@@ -0,0 +1,36 @@
+// Copyright 2015 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_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_REQUEST_H_
+#define IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_REQUEST_H_
+
+#import <Foundation/Foundation.h>
+
+#import "ios/chrome/common/physical_web/physical_web_types.h"
+
+// This class will perform a metadata service web request to expand the given
+// URL and return the metadata of the web page such as the title.
+
+@interface PhysicalWebRequest : NSObject
+
+// Initializes a metadata service web request with information about the
+// physical web device.
+- (instancetype)initWithDevice:(PhysicalWebDevice*)device
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Starts the request and call the given |block| when finished.
+// |block| should not be nil.
+// If an error occurred, the block will be called with a non-nil error.
+// When no error occurred, the result will be available in a PhysicalWebDevice
+// data structure.
+- (void)start:(physical_web::RequestFinishedBlock)block;
+
+// Cancels the request.
+- (void)cancel;
+
+@end
+
+#endif // IOS_CHROME_COMMON_PHYSICAL_WEB_PHYSICAL_WEB_REQUEST_H_
« no previous file with comments | « ios/chrome/common/physical_web/physical_web_device.mm ('k') | ios/chrome/common/physical_web/physical_web_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698