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

Side by Side Diff: android_webview/native/input_stream_impl.h

Issue 1557733002: Prepare for -Wall for third-party code, -Wextra for chromium_code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/allocator/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_NATIVE_INPUT_STREAM_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_INPUT_STREAM_H_
6 #define ANDROID_WEBVIEW_NATIVE_INPUT_STREAM_H_ 6 #define ANDROID_WEBVIEW_NATIVE_INPUT_STREAM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "android_webview/browser/input_stream.h" 10 #include "android_webview/browser/input_stream.h"
(...skipping 14 matching lines...) Expand all
25 25
26 static const InputStreamImpl* FromInputStream( 26 static const InputStreamImpl* FromInputStream(
27 const InputStream* input_stream); 27 const InputStream* input_stream);
28 28
29 // |stream| should be an instance of the InputStream Java class. 29 // |stream| should be an instance of the InputStream Java class.
30 // |stream| can't be null. 30 // |stream| can't be null.
31 InputStreamImpl(const base::android::JavaRef<jobject>& stream); 31 InputStreamImpl(const base::android::JavaRef<jobject>& stream);
32 ~InputStreamImpl() override; 32 ~InputStreamImpl() override;
33 33
34 // Gets the underlying Java object. Guaranteed non-NULL. 34 // Gets the underlying Java object. Guaranteed non-NULL.
35 const jobject jobj() const { return jobject_.obj(); } 35 jobject jobj() const { return jobject_.obj(); }
36 36
37 // InputStream implementation. 37 // InputStream implementation.
38 bool BytesAvailable(int* bytes_available) const override; 38 bool BytesAvailable(int* bytes_available) const override;
39 bool Skip(int64_t n, int64_t* bytes_skipped) override; 39 bool Skip(int64_t n, int64_t* bytes_skipped) override;
40 bool Read(net::IOBuffer* dest, int length, int* bytes_read) override; 40 bool Read(net::IOBuffer* dest, int length, int* bytes_read) override;
41 41
42 protected: 42 protected:
43 // Parameterless constructor exposed for testing. 43 // Parameterless constructor exposed for testing.
44 InputStreamImpl(); 44 InputStreamImpl();
45 45
46 private: 46 private:
47 base::android::ScopedJavaGlobalRef<jobject> jobject_; 47 base::android::ScopedJavaGlobalRef<jobject> jobject_;
48 base::android::ScopedJavaGlobalRef<jbyteArray> buffer_; 48 base::android::ScopedJavaGlobalRef<jbyteArray> buffer_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(InputStreamImpl); 50 DISALLOW_COPY_AND_ASSIGN(InputStreamImpl);
51 }; 51 };
52 52
53 bool RegisterInputStream(JNIEnv* env); 53 bool RegisterInputStream(JNIEnv* env);
54 54
55 } // namespace android_webview 55 } // namespace android_webview
56 56
57 #endif // ANDROID_WEBVIEW_NATIVE_INPUT_STREAM_H_ 57 #endif // ANDROID_WEBVIEW_NATIVE_INPUT_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | base/allocator/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698