Don't reset the database when there was an I/O error.
[chromium-blink-merge.git] / android_webview / native / java_browser_view_renderer_helper.h
blob986d737b0ac594922e2af8f7611b69624d4a07a0
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
6 #define ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
8 #include "android_webview/browser/browser_view_renderer.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "base/compiler_specific.h"
12 namespace android_webview {
14 // Native side of java-class of same name.
15 // Provides utility methods for rendering involving with Java objects.
16 class JavaBrowserViewRendererHelper : public BrowserViewRenderer::JavaHelper {
17 public:
18 JavaBrowserViewRendererHelper();
19 virtual ~JavaBrowserViewRendererHelper();
21 static JavaBrowserViewRendererHelper* GetInstance();
23 // BrowserViewRenderer::JavaHelper implementation.
24 virtual base::android::ScopedJavaLocalRef<jobject> CreateBitmap(
25 JNIEnv* env,
26 int width,
27 int height,
28 const base::android::JavaRef<jobject>& jcanvas,
29 void* owner_key) OVERRIDE;
30 virtual void DrawBitmapIntoCanvas(
31 JNIEnv* env,
32 const base::android::JavaRef<jobject>& jbitmap,
33 const base::android::JavaRef<jobject>& jcanvas,
34 int x,
35 int y) OVERRIDE;
36 virtual base::android::ScopedJavaLocalRef<jobject> RecordBitmapIntoPicture(
37 JNIEnv* env,
38 const base::android::JavaRef<jobject>& jbitmap) OVERRIDE;
41 bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env);
43 } // namespace android_webview
45 #endif // ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_