Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: components/mus/ws/display.cc

Issue 1868783003: Makes SetFocus() notify callback correctly on failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/display.h ('k') | components/mus/ws/display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/display.cc
diff --git a/components/mus/ws/display.cc b/components/mus/ws/display.cc
index f8582f65e1902057421e986d1a397ff2cd078662..f3f43c20199d16e9483d638296b942cff649d52a 100644
--- a/components/mus/ws/display.cc
+++ b/components/mus/ws/display.cc
@@ -157,12 +157,12 @@ const WindowManagerState* Display::GetActiveWindowManagerState() const {
window_server_->user_id_tracker()->active_id());
}
-void Display::SetFocusedWindow(ServerWindow* new_focused_window) {
+bool Display::SetFocusedWindow(ServerWindow* new_focused_window) {
ServerWindow* old_focused_window = focus_controller_->GetFocusedWindow();
if (old_focused_window == new_focused_window)
- return;
+ return true;
DCHECK(!new_focused_window || root_window()->Contains(new_focused_window));
- focus_controller_->SetFocusedWindow(new_focused_window);
+ return focus_controller_->SetFocusedWindow(new_focused_window);
}
ServerWindow* Display::GetFocusedWindow() {
« no previous file with comments | « components/mus/ws/display.h ('k') | components/mus/ws/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698