Index: components/web_restrictions/browser/web_restrictions_client_result.h |
diff --git a/components/web_restrictions/browser/web_restrictions_client_result.h b/components/web_restrictions/browser/web_restrictions_client_result.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..aaf6e6c5732b5e7fc3841c1fa7cae40a4e14ed57 |
--- /dev/null |
+++ b/components/web_restrictions/browser/web_restrictions_client_result.h |
@@ -0,0 +1,36 @@ |
+// 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. |
+ |
+#ifndef COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_CLIENT_RESULT_H_ |
+#define COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_CLIENT_RESULT_H_ |
+ |
+#include <string> |
+ |
+#include "base/android/jni_android.h" |
+#include "base/android/scoped_java_ref.h" |
+ |
+namespace web_restrictions { |
+ |
+// Wrapper for Java WebRestrictionsResult |
+class WebRestrictionsClientResult { |
+ public: |
+ WebRestrictionsClientResult( |
+ base::android::ScopedJavaGlobalRef<jobject>& jresult); |
+ WebRestrictionsClientResult(const WebRestrictionsClientResult& other); |
+ ~WebRestrictionsClientResult(); |
+ |
+ bool ShouldProceed() const; |
+ int GetColumnCount() const; |
+ bool IsString(int column) const; |
+ int GetInt(int column) const; |
+ std::string GetString(int column) const; |
+ std::string GetColumnName(int column) const; |
+ |
+ private: |
+ base::android::ScopedJavaGlobalRef<jobject> jresult_; |
+}; |
+ |
+} // namespace web_restrictions |
+ |
+#endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_CLIENT_RESULT_H_ |