OLD | NEW |
---|---|
(Empty) | |
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. | |
4 #ifndef IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_ | |
sdefresne
2015/04/02 17:20:28
style: empty line before #include guard
| |
5 #define IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_ | |
6 | |
7 #import <UIKit/UIKit.h> | |
8 | |
9 #include "base/mac/objc_property_releaser.h" | |
10 #import "ios/web/public/web_state/crw_native_content.h" | |
11 #include "url/gurl.h" | |
12 | |
13 // Abstract base class for controllers that implement the behavior for native | |
14 // views that are presented inside the web content area. Automatically removes | |
15 // |view| from the view hierarchy when it is destroyed. Subclasses are | |
16 // responsible for setting the view (usually through loading a nib) and the | |
17 // page title. | |
18 @interface NativeContentController : NSObject<CRWNativeContent> { | |
sdefresne
2015/04/02 17:20:28
Can you use the occasion to move the ivar to the .
droger
2015/04/03 08:59:07
No. These are @protected and used by subclasses.
I
| |
19 @protected | |
20 UIView* view_; // Top-level view. | |
21 NSString* title_; | |
22 GURL url_; | |
23 base::mac::ObjCPropertyReleaser propertyReleaser_NativeContentController_; | |
24 } | |
25 | |
26 @property(nonatomic, retain) IBOutlet UIView* view; | |
27 @property(nonatomic, copy) NSString* title; | |
28 @property(nonatomic, readonly, assign) const GURL& url; | |
29 | |
30 // Initializer that attempts to load the nib specified in |nibName| for | |
31 // |url|, which may be nil. | |
32 - (instancetype)initWithNibName:(NSString*)nibName url:(const GURL&)url; | |
33 | |
34 // Initializer with the |url| to be loaded. | |
35 - (instancetype)initWithURL:(const GURL&)url; | |
36 | |
37 // Called when memory is low and this is not the foreground tab. Release | |
38 // anything (such as views) that can be easily re-created to free up RAM. | |
39 // Subclasses that override this method should always call | |
40 // [super handleLowMemory]. | |
41 - (void)handleLowMemory; | |
42 | |
43 @end | |
44 | |
45 #endif // IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_ | |
OLD | NEW |