mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
alloy: Use Chrome JS dialogs on Windows/Linux (fixes issue #3316)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
#include "libcef/browser/alloy/alloy_browser_host_impl.h"
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/native/javascript_dialog_runner_win.h"
|
||||
#include "libcef/browser/native/window_delegate_view.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
|
||||
@@ -425,22 +424,6 @@ CefEventHandle CefBrowserPlatformDelegateNativeWin::GetEventHandle(
|
||||
const_cast<CHROME_MSG*>(&event.os_event->native_event()));
|
||||
}
|
||||
|
||||
std::unique_ptr<CefJavaScriptDialogRunner>
|
||||
CefBrowserPlatformDelegateNativeWin::CreateJavaScriptDialogRunner() {
|
||||
return base::WrapUnique(new CefJavaScriptDialogRunnerWin);
|
||||
}
|
||||
|
||||
gfx::Point CefBrowserPlatformDelegateNativeWin::GetDialogPosition(
|
||||
const gfx::Size& size) {
|
||||
const gfx::Size& max_size = GetMaximumDialogSize();
|
||||
return gfx::Point((max_size.width() - size.width()) / 2,
|
||||
(max_size.height() - size.height()) / 2);
|
||||
}
|
||||
|
||||
gfx::Size CefBrowserPlatformDelegateNativeWin::GetMaximumDialogSize() {
|
||||
return GetWindowWidget()->GetWindowBoundsInScreen().size();
|
||||
}
|
||||
|
||||
ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent(
|
||||
const CefKeyEvent& key_event) const {
|
||||
int flags = TranslateUiEventModifiers(key_event.modifiers);
|
||||
|
Reference in New Issue
Block a user