Index: components/web_restrictions/browser/web_restictions_client_result.h |
diff --git a/components/web_restrictions/browser/web_restictions_client_result.h b/components/web_restrictions/browser/web_restictions_client_result.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..94af08c115b17a7f063e8dea2e6e78d10436871b |
--- /dev/null |
+++ b/components/web_restrictions/browser/web_restictions_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_RESTICTIONS_CLIENT_RESULT_H_ |
+#define COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTICTIONS_CLIENT_RESULT_H_ |
Bernhard Bauer
2016/04/18 14:48:34
This file should be .../web_restrictions_client_re
aberent
2016/05/18 20:06:50
Done.
|
+ |
+#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(); |
Bernhard Bauer
2016/04/18 14:48:34
Is this constructor used?
aberent
2016/05/18 20:06:50
Not now that I have changed the code to use std::m
|
+ WebRestrictionsClientResult( |
+ base::android::ScopedJavaGlobalRef<jobject>& jresult); |
Bernhard Bauer
2016/04/18 14:48:34
Nit: empty line after the constructors.
aberent
2016/05/18 20:06:50
Done.
|
+ 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_; |
Bernhard Bauer
2016/04/18 14:48:34
DISALLOW_COPY_AND_ASSIGN? It would be weird to mak
aberent
2016/05/18 20:06:50
No. It needs to be copyable:
1 - To allow its inse
|
+}; |
+ |
+} // namespace web_restrictions |
+ |
+#endif // COMPONENTS_WEB_RESTRICTIONS_BROWSER_WEB_RESTICTIONS_CLIENT_RESULT_H_ |