// Copyright (c) 2014 The Chromium Embedded Framework 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 JCEF_NATIVE_DIALOG_HANDLER_H_ #define JCEF_NATIVE_DIALOG_HANDLER_H_ #pragma once #include #include "include/cef_dialog_handler.h" #include "jni_scoped_helpers.h" // DialogHandler implementation. class DialogHandler : public CefDialogHandler { public: DialogHandler(JNIEnv* env, jobject handler); // CefDialogHandler methods virtual bool OnFileDialog(CefRefPtr browser, FileDialogMode mode, const CefString& title, const CefString& default_file_path, const std::vector& accept_filters, const std::vector& accept_extensions, const std::vector& accept_descriptions, CefRefPtr callback) override; protected: ScopedJNIObjectGlobal handle_; // Include the default reference counting implementation. IMPLEMENT_REFCOUNTING(DialogHandler); }; #endif // JCEF_NATIVE_DIALOG_HANDLER_H_