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

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: Fix final nits 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: 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_

Powered by Google App Engine
This is Rietveld 408576698