Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 COMPONENTS_WEB_RESTRICTIONS_BROWSER_MOCK_WEB_RESTRICTIONS_CLIENT_H_ | |
| 6 #define COMPONENTS_WEB_RESTRICTIONS_BROWSER_MOCK_WEB_RESTRICTIONS_CLIENT_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "jni/MockWebRestrictionsClient_jni.h" | |
| 10 | |
| 11 namespace web_restrictions { | |
| 12 | |
| 13 // This is a wrapper for the Java MockWebRestrictionsClient. | |
| 14 class MockWebRestrictionsClient { | |
| 15 public: | |
| 16 MockWebRestrictionsClient() { | |
|
Bernhard Bauer
2016/02/23 14:29:13
Usually, these method bodies should be out of line
aberent
2016/02/23 16:26:51
Done.
| |
| 17 Java_MockWebRestrictionsClient_registerAsMockForTesting( | |
| 18 base::android::AttachCurrentThread()); | |
| 19 } | |
| 20 | |
| 21 ~MockWebRestrictionsClient() { | |
| 22 Java_MockWebRestrictionsClient_unregisterAsMockForTesting( | |
| 23 base::android::AttachCurrentThread()); | |
| 24 } | |
| 25 | |
| 26 static bool Register(JNIEnv* env) { return RegisterNativesImpl(env); } | |
| 27 }; | |
| 28 | |
| 29 } // namespace web_restrictions | |
| 30 #endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_MOCK_WEB_RESTRICTIONS_CLIENT_H_ | |
| OLD | NEW |