Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / chrome / browser / ui / native_content_controller.h
blob904ed9f9e4091348de4527e7f395a8f86219276d
1 // Copyright 2012 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.
5 #ifndef IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_
8 #import <Foundation/Foundation.h>
10 #import "ios/web/public/web_state/ui/crw_native_content.h"
12 class GURL;
13 @class UIView;
15 // Abstract base class for controllers that implement the behavior for native
16 // views that are presented inside the web content area. Automatically removes
17 // |view| from the view hierarchy when it is destroyed. Subclasses are
18 // responsible for setting the view (usually through loading a nib) and the
19 // page title.
20 @interface NativeContentController : NSObject<CRWNativeContent>
22 // Top-level view.
23 @property(nonatomic, retain) IBOutlet UIView* view;
24 @property(nonatomic, copy) NSString* title;
25 @property(nonatomic, readonly, assign) const GURL& url;
27 // Initializer that attempts to load the nib specified in |nibName|, which may
28 // be nil. The |url| is the url to be loaded.
29 - (instancetype)initWithNibName:(NSString*)nibName
30 url:(const GURL&)url NS_DESIGNATED_INITIALIZER;
32 - (instancetype)init NS_UNAVAILABLE;
34 // Initializer with the |url| to be loaded.
35 - (instancetype)initWithURL:(const GURL&)url;
37 @end
39 #endif // IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_