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

Side by Side Diff: components/mus/ws/window_server.h

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 unified diff | Download patch
« no previous file with comments | « components/mus/ws/focus_controller.cc ('k') | components/mus/ws/window_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_MUS_WS_WINDOW_SERVER_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_SERVER_H_
6 #define COMPONENTS_MUS_WS_WINDOW_SERVER_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_SERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window)); 127 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window));
128 } 128 }
129 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const; 129 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const;
130 130
131 void OnFirstWindowManagerFactorySet(); 131 void OnFirstWindowManagerFactorySet();
132 132
133 WindowManagerFactoryRegistry* window_manager_factory_registry() { 133 WindowManagerFactoryRegistry* window_manager_factory_registry() {
134 return &window_manager_factory_registry_; 134 return &window_manager_factory_registry_;
135 } 135 }
136 136
137 void SetFocusedWindow(ServerWindow* window); 137 // Sets focus to |window|. Returns true if |window| already has focus, or
138 // focus was successfully changed. Returns |false| if |window| is not a valid
139 // window to receive focus.
140 bool SetFocusedWindow(ServerWindow* window);
138 ServerWindow* GetFocusedWindow(); 141 ServerWindow* GetFocusedWindow();
139 142
140 // Returns a change id for the window manager that is associated with 143 // Returns a change id for the window manager that is associated with
141 // |source| and |client_change_id|. When the window manager replies 144 // |source| and |client_change_id|. When the window manager replies
142 // WindowManagerChangeCompleted() is called to obtain the original source 145 // WindowManagerChangeCompleted() is called to obtain the original source
143 // and client supplied change_id that initiated the called. 146 // and client supplied change_id that initiated the called.
144 uint32_t GenerateWindowManagerChangeId(WindowTree* source, 147 uint32_t GenerateWindowManagerChangeId(WindowTree* source,
145 uint32_t client_change_id); 148 uint32_t client_change_id);
146 149
147 // Called when a response from the window manager is obtained. Calls to 150 // Called when a response from the window manager is obtained. Calls to
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 297
295 WindowManagerFactoryRegistry window_manager_factory_registry_; 298 WindowManagerFactoryRegistry window_manager_factory_registry_;
296 299
297 DISALLOW_COPY_AND_ASSIGN(WindowServer); 300 DISALLOW_COPY_AND_ASSIGN(WindowServer);
298 }; 301 };
299 302
300 } // namespace ws 303 } // namespace ws
301 } // namespace mus 304 } // namespace mus
302 305
303 #endif // COMPONENTS_MUS_WS_WINDOW_SERVER_H_ 306 #endif // COMPONENTS_MUS_WS_WINDOW_SERVER_H_
OLDNEW
« no previous file with comments | « components/mus/ws/focus_controller.cc ('k') | components/mus/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698