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

Unified Diff: ios/web/public/test/native_controller_test_util.mm

Issue 2277103003: Add GetCurrentNativeController to webstate. (Closed)
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/public/test/native_controller_test_util.mm
diff --git a/ios/web/public/test/native_controller_test_util.mm b/ios/web/public/test/native_controller_test_util.mm
new file mode 100644
index 0000000000000000000000000000000000000000..3267b2cdf1a2cee4bcf05db0b448017e7d82029b
--- /dev/null
+++ b/ios/web/public/test/native_controller_test_util.mm
@@ -0,0 +1,20 @@
+// Copyright 2016 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.
+
+#import "ios/web/public/test/native_controller_test_util.h"
+
+#import "ios/web/web_state/ui/crw_web_controller.h"
+#import "ios/web/web_state/web_state_impl.h"
+
+namespace web {
+namespace test {
+
+id GetCurrentNativeController(WebState* web_state) {
+ web::WebStateImpl* web_state_impl =
+ static_cast<web::WebStateImpl*>(web_state);
+ return [web_state_impl->GetWebController() nativeController];
+}
+
+} // namespace test
+} // namespace web

Powered by Google App Engine
This is Rietveld 408576698