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

Unified Diff: ios/chrome/browser/ui/activity_services/chrome_activity_item_thumbnail_generator.h

Issue 2645653003: Expose thumbnails of pages to iOS share extensions. (Closed)
Patch Set: Created 3 years, 11 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/browser/ui/activity_services/chrome_activity_item_thumbnail_generator.h
diff --git a/ios/chrome/browser/ui/activity_services/chrome_activity_item_thumbnail_generator.h b/ios/chrome/browser/ui/activity_services/chrome_activity_item_thumbnail_generator.h
new file mode 100644
index 0000000000000000000000000000000000000000..b8182680755a018c6d47122909fc7a14f929809d
--- /dev/null
+++ b/ios/chrome/browser/ui/activity_services/chrome_activity_item_thumbnail_generator.h
@@ -0,0 +1,23 @@
+// 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_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_THUMBNAIL_GENERATOR_H_
+#define IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_THUMBNAIL_GENERATOR_H_
+
+#import <CoreGraphics/CoreGraphics.h>
+#import <UIKit/UIKit.h>
+
+@class Tab;
+
+// Block returning a thumbnail at the specified size. May return nil.
+typedef UIImage* (^ThumbnailGenerator)(CGSize);
Olivier 2017/01/20 10:14:00 const CGSize& ?
Olivier 2017/01/20 10:14:00 I would add block to the name. I wondered until I
jif 2017/01/24 10:29:50 Done.
jif 2017/01/24 10:29:50 Done.
+
+namespace activity_services {
+
+// Returns a thumbnail generator for the tab |tab|.
+ThumbnailGenerator thumbNailGeneratorForTab(Tab* tab);
Olivier 2017/01/20 10:14:00 ThumbnailGeneratorForTab
jif 2017/01/24 10:29:50 Done.
+
+} // namespace activity_services
+
+#endif // IOS_CHROME_BROWSER_UI_ACTIVITY_SERVICES_CHROME_ACTIVITY_ITEM_THUMBNAIL_GENERATOR_H_

Powered by Google App Engine
This is Rietveld 408576698