| 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 #import "ios/web/web_view_counter_impl.h" | 5 #import "ios/web/web_view_counter_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "ios/web/public/browser_state.h" | 10 #include "ios/web/public/browser_state.h" |
| 9 #include "ios/web/public/web_thread.h" | 11 #include "ios/web/public/web_thread.h" |
| 10 | 12 |
| 11 namespace web { | 13 namespace web { |
| 12 | 14 |
| 13 namespace { | 15 namespace { |
| 14 // A key used to associate a WebViewCounter with a BrowserState. | 16 // A key used to associate a WebViewCounter with a BrowserState. |
| 15 const char kWebViewCounterKeyName[] = "web_view_counter"; | 17 const char kWebViewCounterKeyName[] = "web_view_counter"; |
| 16 } // namespace | 18 } // namespace |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 55 |
| 54 void WebViewCounterImpl::InsertWKWebView(WKWebView* wk_web_view) { | 56 void WebViewCounterImpl::InsertWKWebView(WKWebView* wk_web_view) { |
| 55 DCHECK_CURRENTLY_ON_WEB_THREAD(WebThread::UI); | 57 DCHECK_CURRENTLY_ON_WEB_THREAD(WebThread::UI); |
| 56 DCHECK(wk_web_view); | 58 DCHECK(wk_web_view); |
| 57 DCHECK([wk_web_view isKindOfClass:[WKWebView class]]); | 59 DCHECK([wk_web_view isKindOfClass:[WKWebView class]]); |
| 58 | 60 |
| 59 wk_web_view_counter_.Insert(wk_web_view); | 61 wk_web_view_counter_.Insert(wk_web_view); |
| 60 } | 62 } |
| 61 | 63 |
| 62 } // namespace web | 64 } // namespace web |
| OLD | NEW |