most_visited_tile_view.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef IOS_CHROME_CONTENT_WIDGET_EXTENSION_MOST_VISITED_TILE_VIEW_H_
  5. #define IOS_CHROME_CONTENT_WIDGET_EXTENSION_MOST_VISITED_TILE_VIEW_H_
  6. #import <UIKit/UIKit.h>
  7. #import "ios/chrome/common/ui/elements/highlight_button.h"
  8. @class FaviconView;
  9. // View to display a Most Visited tile based on the suggestion.
  10. // It displays the favicon for this Most Visited suggestion and its title.
  11. @interface MostVisitedTileView : HighlightButton
  12. // Returns the fixed width of a tile.
  13. + (CGFloat)tileWidth;
  14. // Designated initializer.
  15. - (nonnull instancetype)init NS_DESIGNATED_INITIALIZER;
  16. - (nonnull instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
  17. - (nonnull instancetype)initWithCoder:(nonnull NSCoder*)aDecoder NS_UNAVAILABLE;
  18. // FaviconView displaying the favicon.
  19. @property(nonatomic, strong, readonly, nonnull) FaviconView* faviconView;
  20. // Title of the Most Visited.
  21. @property(nonatomic, strong, readonly, nonnull) UILabel* titleLabel;
  22. // URL of the Most Visited.
  23. @property(nonatomic, strong, nullable) NSURL* URL;
  24. @end
  25. #endif // IOS_CHROME_CONTENT_WIDGET_EXTENSION_MOST_VISITED_TILE_VIEW_H_