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_WEB_RESTRICTIONS_CLIENT_RESULT_H_ |
| 6 #define COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_CLIENT_RESULT_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/android/jni_android.h" |
| 11 #include "base/android/scoped_java_ref.h" |
| 12 |
| 13 namespace web_restrictions { |
| 14 |
| 15 // Wrapper for Java WebRestrictionsResult |
| 16 class WebRestrictionsClientResult { |
| 17 public: |
| 18 WebRestrictionsClientResult( |
| 19 base::android::ScopedJavaGlobalRef<jobject>& jresult); |
| 20 WebRestrictionsClientResult(const WebRestrictionsClientResult& other); |
| 21 ~WebRestrictionsClientResult(); |
| 22 |
| 23 bool ShouldProceed() const; |
| 24 int GetColumnCount() const; |
| 25 bool IsString(int column) const; |
| 26 int GetInt(int column) const; |
| 27 std::string GetString(int column) const; |
| 28 std::string GetColumnName(int column) const; |
| 29 |
| 30 private: |
| 31 base::android::ScopedJavaGlobalRef<jobject> jresult_; |
| 32 }; |
| 33 |
| 34 } // namespace web_restrictions |
| 35 |
| 36 #endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_CLIENT_RESULT_H_ |
OLD | NEW |