| Index: ios/web/webui/crw_web_ui_manager.h
|
| diff --git a/ios/web/webui/crw_web_ui_manager.h b/ios/web/webui/crw_web_ui_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a4b805325d6485edecc7bdf0b50b67f62e64647a
|
| --- /dev/null
|
| +++ b/ios/web/webui/crw_web_ui_manager.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2015 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_WEB_WEBUI_CRW_WEB_UI_MANAGER_H_
|
| +#define IOS_WEB_WEBUI_CRW_WEB_UI_MANAGER_H_
|
| +
|
| +#import <Foundation/Foundation.h>
|
| +
|
| +#import "ios/web/public/web_state/web_state_observer_bridge.h"
|
| +#import "ios/web/webui/url_fetcher_block_adapter.h"
|
| +
|
| +class GURL;
|
| +
|
| +namespace web {
|
| +class WebStateImpl;
|
| +} // namespace web
|
| +
|
| +// Class for managing WebUI pages. Manages fetching of resources and post-load
|
| +// operations such as favicon loading. Initialized instances of CRWWebUIManager
|
| +// will automatically register as an observer of webState, and should be kept in
|
| +// scope for the lifetime of the WebUI page.
|
| +@interface CRWWebUIManager : NSObject<CRWWebStateObserver>
|
| +
|
| +// Designated initializer.
|
| +- (instancetype)initWithWebState:(web::WebStateImpl*)webState;
|
| +
|
| +@end
|
| +
|
| +@interface CRWWebUIManager (UsedOnlyForTesting) // Testing API.
|
| +
|
| +// Returns URLFetcherBlockAdapter for fetching resource for URL. Can be
|
| +// overwritten by test classes to mock resource retrieval.
|
| +- (scoped_ptr<web::URLFetcherBlockAdapter>)
|
| + fetcherForURL:(const GURL&)URL
|
| + completionHandler:(web::URLFetcherBlockAdapterCompletion)handler;
|
| +
|
| +@end
|
| +
|
| +#endif // IOS_WEB_WEBUI_CRW_WEB_UI_MANAGER_H_
|
|
|