cef/patch/patches/aura_window_1677.patch
2015-08-14 14:42:03 -04:00

33 lines
916 B
Diff

diff --git window.cc window.cc
index 6cde8c2..bdd5093 100644
--- window.cc
+++ window.cc
@@ -522,6 +522,12 @@ void Window::Focus() {
client->FocusWindow(this);
}
+void Window::Blur() {
+ client::FocusClient* client = client::GetFocusClient(this);
+ DCHECK(client);
+ client->FocusWindow(NULL);
+}
+
bool Window::HasFocus() const {
client::FocusClient* client = client::GetFocusClient(this);
return client && client->GetFocusedWindow() == this;
diff --git window.h window.h
index 5586044..53bfd2e 100644
--- window.h
+++ window.h
@@ -262,8 +262,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// that has a delegate set). The toplevel window may be |this|.
Window* GetToplevelWindow();
- // Claims focus.
+ // Claims or relinquishes the claim to focus.
void Focus();
+ void Blur();
// Returns true if the Window is currently the focused window.
bool HasFocus() const;