OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_WEB_WEB_STATE_UI_WK_WEB_VIEW_CONFIGURATION_PROVIDER_H_ | 5 #ifndef IOS_WEB_WEB_STATE_UI_WK_WEB_VIEW_CONFIGURATION_PROVIDER_H_ |
6 #define IOS_WEB_WEB_STATE_UI_WK_WEB_VIEW_CONFIGURATION_PROVIDER_H_ | 6 #define IOS_WEB_WEB_STATE_UI_WK_WEB_VIEW_CONFIGURATION_PROVIDER_H_ |
7 | 7 |
8 #import "base/mac/scoped_nsobject.h" | 8 #import "base/mac/scoped_nsobject.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 // Lazily creates the router. Callers must not retain the returned object | 38 // Lazily creates the router. Callers must not retain the returned object |
39 // (this will be enforced in debug builds). | 39 // (this will be enforced in debug builds). |
40 CRWWKScriptMessageRouter* GetScriptMessageRouter(); | 40 CRWWKScriptMessageRouter* GetScriptMessageRouter(); |
41 | 41 |
42 // Purges config and router objects if they exist. When this method is called | 42 // Purges config and router objects if they exist. When this method is called |
43 // config and config's process pool must not be retained by anyone (this will | 43 // config and config's process pool must not be retained by anyone (this will |
44 // be enforced in debug builds). | 44 // be enforced in debug builds). |
45 void Purge(); | 45 void Purge(); |
46 | 46 |
47 private: | 47 private: |
48 explicit WKWebViewConfigurationProvider(bool is_off_the_record); | 48 explicit WKWebViewConfigurationProvider(bool is_off_the_record, |
Eugene But (OOO till 7-30)
2017/03/16 16:12:40
No need to pass |is_off_the_record| flag anymore a
Hiroshi Ichikawa
2017/03/17 06:09:24
Good point. Done.
| |
49 BrowserState* browser_state); | |
49 WKWebViewConfigurationProvider() = delete; | 50 WKWebViewConfigurationProvider() = delete; |
50 ~WKWebViewConfigurationProvider() override; | 51 ~WKWebViewConfigurationProvider() override; |
51 | 52 |
52 base::scoped_nsobject<WKWebViewConfiguration> configuration_; | 53 base::scoped_nsobject<WKWebViewConfiguration> configuration_; |
53 base::scoped_nsobject<CRWWKScriptMessageRouter> router_; | 54 base::scoped_nsobject<CRWWKScriptMessageRouter> router_; |
54 // Result of |web::BrowserState::IsOffTheRecord| call. | 55 // Result of |web::BrowserState::IsOffTheRecord| call. |
55 bool is_off_the_record_; | 56 bool is_off_the_record_; |
57 BrowserState* browser_state_; | |
56 | 58 |
57 DISALLOW_COPY_AND_ASSIGN(WKWebViewConfigurationProvider); | 59 DISALLOW_COPY_AND_ASSIGN(WKWebViewConfigurationProvider); |
58 }; | 60 }; |
59 | 61 |
60 } // namespace web | 62 } // namespace web |
61 | 63 |
62 #endif // IOS_WEB_WEB_STATE_UI_WK_WEB_VIEW_CONFIGURATION_PROVIDER_H_ | 64 #endif // IOS_WEB_WEB_STATE_UI_WK_WEB_VIEW_CONFIGURATION_PROVIDER_H_ |
OLD | NEW |