Mac: Remove duplicate focus change notification
This commit is contained in:
parent
558e60afba
commit
6779696971
|
@ -92,18 +92,6 @@
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when we are activated (when we gain focus).
|
|
||||||
- (void)windowDidBecomeKey:(NSNotification*)notification {
|
|
||||||
if (browser_)
|
|
||||||
browser_->SetFocus(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called when we are deactivated (when we lose focus).
|
|
||||||
- (void)windowDidResignKey:(NSNotification*)notification {
|
|
||||||
if (browser_)
|
|
||||||
browser_->SetFocus(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)windowShouldClose:(id)window {
|
- (BOOL)windowShouldClose:(id)window {
|
||||||
if (browser_ && !browser_->TryCloseBrowser()) {
|
if (browser_ && !browser_->TryCloseBrowser()) {
|
||||||
// Cancel the close.
|
// Cancel the close.
|
||||||
|
|
|
@ -60,10 +60,12 @@ void BrowserWindowStdMac::ShowPopup(ClientWindowHandle parent_handle,
|
||||||
|
|
||||||
void BrowserWindowStdMac::Show() {
|
void BrowserWindowStdMac::Show() {
|
||||||
REQUIRE_MAIN_THREAD();
|
REQUIRE_MAIN_THREAD();
|
||||||
|
// Nothing to do here. Chromium internally handles window show/hide.
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindowStdMac::Hide() {
|
void BrowserWindowStdMac::Hide() {
|
||||||
REQUIRE_MAIN_THREAD();
|
REQUIRE_MAIN_THREAD();
|
||||||
|
// Nothing to do here. Chromium internally handles window show/hide.
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindowStdMac::SetBounds(int x, int y, size_t width, size_t height) {
|
void BrowserWindowStdMac::SetBounds(int x, int y, size_t width, size_t height) {
|
||||||
|
@ -73,9 +75,7 @@ void BrowserWindowStdMac::SetBounds(int x, int y, size_t width, size_t height) {
|
||||||
|
|
||||||
void BrowserWindowStdMac::SetFocus(bool focus) {
|
void BrowserWindowStdMac::SetFocus(bool focus) {
|
||||||
REQUIRE_MAIN_THREAD();
|
REQUIRE_MAIN_THREAD();
|
||||||
|
// Nothing to do here. Chromium internally handles window focus assignment.
|
||||||
if (browser_)
|
|
||||||
browser_->GetHost()->SetFocus(focus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientWindowHandle BrowserWindowStdMac::GetWindowHandle() const {
|
ClientWindowHandle BrowserWindowStdMac::GetWindowHandle() const {
|
||||||
|
|
Loading…
Reference in New Issue