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

Unified Diff: components/web_restrictions/browser/web_restrictions_client_result.h

Issue 1890203002: Implement Web Restrictions in WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments, and fix a possible race in displaying error page Created 4 years, 7 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: 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..b4f84b20eb3484bab1695b18cb5aa8ce6d354380
--- /dev/null
+++ b/components/web_restrictions/browser/web_restrictions_client_result.h
@@ -0,0 +1,37 @@
+// 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);
+
+ 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;
+
+ // Register JNI methods.
+ static bool Register(JNIEnv* env);
+
+ private:
+ base::android::ScopedJavaGlobalRef<jobject> jresult_;
+};
+
+} // namespace web_restrictions
+
+#endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTRICTIONS_CLIENT_RESULT_H_

Powered by Google App Engine
This is Rietveld 408576698