mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Rename SendFocusEvent to SetFocus (fixes issue #866)
Also removes CefBrowserHost::SendFocusEvent. Use the existing SetFocus method instead.
This commit is contained in:
@@ -1041,7 +1041,7 @@ void BrowserWindowOsrGtk::Show() {
|
||||
}
|
||||
|
||||
// Give focus to the browser.
|
||||
browser_->GetHost()->SendFocusEvent(true);
|
||||
browser_->GetHost()->SetFocus(true);
|
||||
}
|
||||
|
||||
void BrowserWindowOsrGtk::Hide() {
|
||||
@@ -1051,7 +1051,7 @@ void BrowserWindowOsrGtk::Hide() {
|
||||
return;
|
||||
|
||||
// Remove focus from the browser.
|
||||
browser_->GetHost()->SendFocusEvent(false);
|
||||
browser_->GetHost()->SetFocus(false);
|
||||
|
||||
if (!hidden_) {
|
||||
// Set the browser as hidden.
|
||||
@@ -1648,7 +1648,7 @@ gint BrowserWindowOsrGtk::FocusEvent(GtkWidget* widget,
|
||||
BrowserWindowOsrGtk* self) {
|
||||
// May be called on the main thread and the UI thread.
|
||||
if (self->browser_.get())
|
||||
self->browser_->GetHost()->SendFocusEvent(event->in == TRUE);
|
||||
self->browser_->GetHost()->SetFocus(event->in == TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -486,7 +486,7 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
|
||||
- (BOOL)becomeFirstResponder {
|
||||
CefRefPtr<CefBrowser> browser = [self getBrowser];
|
||||
if (browser.get()) {
|
||||
browser->GetHost()->SendFocusEvent(true);
|
||||
browser->GetHost()->SetFocus(true);
|
||||
return [super becomeFirstResponder];
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
|
||||
- (BOOL)resignFirstResponder {
|
||||
CefRefPtr<CefBrowser> browser = [self getBrowser];
|
||||
if (browser.get()) {
|
||||
browser->GetHost()->SendFocusEvent(false);
|
||||
browser->GetHost()->SetFocus(false);
|
||||
return [super resignFirstResponder];
|
||||
}
|
||||
|
||||
@@ -1431,7 +1431,7 @@ void BrowserWindowOsrMacImpl::Show() {
|
||||
}
|
||||
|
||||
// Give focus to the browser.
|
||||
browser_window_.browser_->GetHost()->SendFocusEvent(true);
|
||||
browser_window_.browser_->GetHost()->SetFocus(true);
|
||||
}
|
||||
|
||||
void BrowserWindowOsrMacImpl::Hide() {
|
||||
@@ -1441,7 +1441,7 @@ void BrowserWindowOsrMacImpl::Hide() {
|
||||
return;
|
||||
|
||||
// Remove focus from the browser.
|
||||
browser_window_.browser_->GetHost()->SendFocusEvent(false);
|
||||
browser_window_.browser_->GetHost()->SetFocus(false);
|
||||
|
||||
if (!hidden_) {
|
||||
// Set the browser as hidden.
|
||||
|
@@ -202,7 +202,7 @@ void OsrWindowWin::Show() {
|
||||
}
|
||||
|
||||
// Give focus to the browser.
|
||||
browser_->GetHost()->SendFocusEvent(true);
|
||||
browser_->GetHost()->SetFocus(true);
|
||||
}
|
||||
|
||||
void OsrWindowWin::Hide() {
|
||||
@@ -216,7 +216,7 @@ void OsrWindowWin::Hide() {
|
||||
return;
|
||||
|
||||
// Remove focus from the browser.
|
||||
browser_->GetHost()->SendFocusEvent(false);
|
||||
browser_->GetHost()->SetFocus(false);
|
||||
|
||||
if (!hidden_) {
|
||||
// Set the browser as hidden.
|
||||
@@ -762,7 +762,7 @@ void OsrWindowWin::OnSize() {
|
||||
|
||||
void OsrWindowWin::OnFocus(bool setFocus) {
|
||||
if (browser_)
|
||||
browser_->GetHost()->SendFocusEvent(setFocus);
|
||||
browser_->GetHost()->SetFocus(setFocus);
|
||||
}
|
||||
|
||||
void OsrWindowWin::OnCaptureLost() {
|
||||
|
@@ -548,7 +548,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
case OSR_TEST_FOCUS:
|
||||
if (StartTest()) {
|
||||
// body.onfocus will make LI00 red
|
||||
browser->GetHost()->SendFocusEvent(true);
|
||||
browser->GetHost()->SetFocus(true);
|
||||
}
|
||||
break;
|
||||
case OSR_TEST_TAKE_FOCUS:
|
||||
@@ -566,7 +566,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
break;
|
||||
case OSR_TEST_GOT_FOCUS:
|
||||
if (StartTest()) {
|
||||
browser->GetHost()->SendFocusEvent(true);
|
||||
browser->GetHost()->SetFocus(true);
|
||||
}
|
||||
break;
|
||||
case OSR_TEST_CURSOR:
|
||||
@@ -750,7 +750,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
ExpandDropDown();
|
||||
// Wait for the first popup paint to occur
|
||||
} else if (type == PET_POPUP) {
|
||||
browser->GetHost()->SendFocusEvent(false);
|
||||
browser->GetHost()->SetFocus(false);
|
||||
}
|
||||
break;
|
||||
case OSR_TEST_POPUP_HIDE_ON_ESC:
|
||||
@@ -1422,7 +1422,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
}
|
||||
|
||||
void ExpandDropDown() {
|
||||
GetBrowser()->GetHost()->SendFocusEvent(true);
|
||||
GetBrowser()->GetHost()->SetFocus(true);
|
||||
CefMouseEvent mouse_event;
|
||||
|
||||
const CefRect& LI11select = GetElementBounds("LI11select");
|
||||
|
Reference in New Issue
Block a user