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

Side by Side Diff: ios/chrome/browser/ui/native_content_controller.h

Issue 1058933002: [iOS] Upstream //ios/chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upstreamMemory
Patch Set: Review comments Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(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
5 #ifndef IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_
7
8 #import <Foundation/Foundation.h>
9
10 #import "ios/web/public/web_state/crw_native_content.h"
11 #include "url/gurl.h"
12
13 @class UIView;
14
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> {
21 @protected
22 UIView* _view; // Top-level view.
23 NSString* _title;
24 GURL _url;
25 }
26
27 @property(nonatomic, retain) IBOutlet UIView* view;
28 @property(nonatomic, copy) NSString* title;
29 @property(nonatomic, readonly, assign) const GURL& url;
30
31 // Initializer that attempts to load the nib specified in |nibName| for
32 // |url|, which may be nil.
33 - (instancetype)initWithNibName:(NSString*)nibName url:(const GURL&)url;
34
35 // Initializer with the |url| to be loaded.
36 - (instancetype)initWithURL:(const GURL&)url;
37
38 // Called when memory is low and this is not the foreground tab. Release
39 // anything (such as views) that can be easily re-created to free up RAM.
40 // Subclasses that override this method should always call
41 // [super handleLowMemory].
42 - (void)handleLowMemory;
43
44 @end
45
46 #endif // IOS_CHROME_BROWSER_UI_NATIVE_CONTENT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/file_locations.mm ('k') | ios/chrome/browser/ui/native_content_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698