mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-30 19:14:56 +01:00
e7ddc933c9
- Remove |accept_lang| parameter from CefJSDialogHandler::OnJSDialog and CefFormatUrlForSecurityDisplay (see https://crbug.com/336973#c36). - Remove remaining NPAPI-related code including functions from cef_web_plugin.h (see https://crbug.com/493212#c55). - Mac: 10.7+ deployment target is now required for client applications. - Mac: Remove CefBrowserHost::SetWindowVisibility (issue #1375). No replacement is required for windowed rendering. Use WasHidden for off-screen rendering. - Windows: Visual Studio 2015 Update 2 is now required when building CEF/Chromium.
60 lines
2.0 KiB
C++
60 lines
2.0 KiB
C++
// Copyright (c) 2015 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 CEF_TESTS_CEFCLIENT_BROWSER_DIALOG_HANDLER_GTK_H_
|
|
#define CEF_TESTS_CEFCLIENT_BROWSER_DIALOG_HANDLER_GTK_H_
|
|
#pragma once
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "include/cef_dialog_handler.h"
|
|
#include "include/cef_jsdialog_handler.h"
|
|
|
|
namespace client {
|
|
|
|
class ClientDialogHandlerGtk : public CefDialogHandler,
|
|
public CefJSDialogHandler {
|
|
public:
|
|
ClientDialogHandlerGtk();
|
|
|
|
// CefDialogHandler methods.
|
|
bool OnFileDialog(CefRefPtr<CefBrowser> browser,
|
|
FileDialogMode mode,
|
|
const CefString& title,
|
|
const CefString& default_file_path,
|
|
const std::vector<CefString>& accept_filters,
|
|
int selected_accept_filter,
|
|
CefRefPtr<CefFileDialogCallback> callback) OVERRIDE;
|
|
|
|
// CefJSDialogHandler methods.
|
|
bool OnJSDialog(CefRefPtr<CefBrowser> browser,
|
|
const CefString& origin_url,
|
|
JSDialogType dialog_type,
|
|
const CefString& message_text,
|
|
const CefString& default_prompt_text,
|
|
CefRefPtr<CefJSDialogCallback> callback,
|
|
bool& suppress_message) OVERRIDE;
|
|
bool OnBeforeUnloadDialog(
|
|
CefRefPtr<CefBrowser> browser,
|
|
const CefString& message_text,
|
|
bool is_reload,
|
|
CefRefPtr<CefJSDialogCallback> callback) OVERRIDE;
|
|
void OnResetDialogState(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
|
|
|
private:
|
|
static void OnDialogResponse(GtkDialog *dialog,
|
|
gint response_id,
|
|
ClientDialogHandlerGtk* handler);
|
|
|
|
GtkWidget* gtk_dialog_;
|
|
CefRefPtr<CefJSDialogCallback> js_dialog_callback_;
|
|
|
|
IMPLEMENT_REFCOUNTING(ClientDialogHandlerGtk);
|
|
DISALLOW_COPY_AND_ASSIGN(ClientDialogHandlerGtk);
|
|
};
|
|
|
|
} // namespace client
|
|
|
|
#endif // CEF_TESTS_CEFCLIENT_BROWSER_DIALOG_HANDLER_GTK_H_
|